home *** CD-ROM | disk | FTP | other *** search
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox ).
Confidence Program Detection Match Type Support
100%
dexvert
Mailbox/MIME Entity (archive/mbox)
magic
Supported
100%
dexvert
Internet Message Format (text/imf)
magic
Supported
1%
dexvert
3DX 3D model (poly/threeDX3DModel)
ext
Unsupported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
Mailbox text, 1st line "From uwmcsd1!bbn!oberon!bloom-beacon!mit-eddie!rutgers!mcnc!ece-csc!ncrcae!ncr-sd!hp-sdd!hplabs!ucbvax!ucdavis!uop!exodus Sun O", ASCII text
default
100%
TrID
E-Mail message (Var. 2)
default
100%
checkBytes
Printable ASCII
default
100%
perlTextCheck
Likely Text (Perl)
default
100%
detectItEasy
Format: plain text[LF]
default (weak)
100%
xdgMime
application/mbox
default
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 46 72 6f 6d 20 75 77 6d | 63 73 64 31 21 62 62 6e |From uwm|csd1!bbn| |00000010| 21 6f 62 65 72 6f 6e 21 | 62 6c 6f 6f 6d 2d 62 65 |!oberon!|bloom-be| |00000020| 61 63 6f 6e 21 6d 69 74 | 2d 65 64 64 69 65 21 72 |acon!mit|-eddie!r| |00000030| 75 74 67 65 72 73 21 6d | 63 6e 63 21 65 63 65 2d |utgers!m|cnc!ece-| |00000040| 63 73 63 21 6e 63 72 63 | 61 65 21 6e 63 72 2d 73 |csc!ncrc|ae!ncr-s| |00000050| 64 21 68 70 2d 73 64 64 | 21 68 70 6c 61 62 73 21 |d!hp-sdd|!hplabs!| |00000060| 75 63 62 76 61 78 21 75 | 63 64 61 76 69 73 21 75 |ucbvax!u|cdavis!u| |00000070| 6f 70 21 65 78 6f 64 75 | 73 20 53 75 6e 20 4f 63 |op!exodu|s Sun Oc| |00000080| 74 20 31 38 20 30 38 3a | 33 32 3a 32 33 20 43 44 |t 18 08:|32:23 CD| |00000090| 54 20 31 39 38 37 0a 41 | 72 74 69 63 6c 65 20 31 |T 1987.A|rticle 1| |000000a0| 39 38 39 20 6f 66 20 63 | 6f 6d 70 2e 73 79 73 2e |989 of c|omp.sys.| |000000b0| 61 74 61 72 69 2e 73 74 | 3a 0a 50 61 74 68 3a 20 |atari.st|:.Path: | |000000c0| 6c 61 6b 65 73 79 73 21 | 75 77 6d 63 73 64 31 21 |lakesys!|uwmcsd1!| |000000d0| 62 62 6e 21 6f 62 65 72 | 6f 6e 21 62 6c 6f 6f 6d |bbn!ober|on!bloom| |000000e0| 2d 62 65 61 63 6f 6e 21 | 6d 69 74 2d 65 64 64 69 |-beacon!|mit-eddi| |000000f0| 65 21 72 75 74 67 65 72 | 73 21 6d 63 6e 63 21 65 |e!rutger|s!mcnc!e| |00000100| 63 65 2d 63 73 63 21 6e | 63 72 63 61 65 21 6e 63 |ce-csc!n|crcae!nc| |00000110| 72 2d 73 64 21 68 70 2d | 73 64 64 21 68 70 6c 61 |r-sd!hp-|sdd!hpla| |00000120| 62 73 21 75 63 62 76 61 | 78 21 75 63 64 61 76 69 |bs!ucbva|x!ucdavi| |00000130| 73 21 75 6f 70 21 65 78 | 6f 64 75 73 0a 3e 46 72 |s!uop!ex|odus.>Fr| |00000140| 6f 6d 3a 20 65 78 6f 64 | 75 73 40 75 6f 70 2e 55 |om: exod|us@uop.U| |00000150| 55 43 50 20 28 46 72 65 | 64 64 79 20 4b 72 65 75 |UCP (Fre|ddy Kreu| |00000160| 67 65 72 29 0a 4e 65 77 | 73 67 72 6f 75 70 73 3a |ger).New|sgroups:| |00000170| 20 63 6f 6d 70 2e 73 79 | 73 2e 61 74 61 72 69 2e | comp.sy|s.atari.| |00000180| 73 74 0a 53 75 62 6a 65 | 63 74 3a 20 50 72 6f 66 |st.Subje|ct: Prof| |00000190| 65 73 73 69 6f 6e 61 6c | 20 47 45 4d 20 43 6f 6c |essional| GEM Col| |000001a0| 75 6d 6e 20 23 31 32 0a | 4b 65 79 77 6f 72 64 73 |umn #12.|Keywords| |000001b0| 3a 20 54 69 6d 20 4f 72 | 65 6e 2c 20 50 72 6f 47 |: Tim Or|en, ProG| |000001c0| 65 6d 0a 4d 65 73 73 61 | 67 65 2d 49 44 3a 20 3c |em.Messa|ge-ID: <| |000001d0| 36 31 35 40 75 6f 70 2e | 55 55 43 50 3e 0a 44 61 |615@uop.|UUCP>.Da| |000001e0| 74 65 3a 20 31 36 20 4f | 63 74 20 38 37 20 32 33 |te: 16 O|ct 87 23| |000001f0| 3a 34 39 3a 33 35 20 47 | 4d 54 0a 4f 72 67 61 6e |:49:35 G|MT.Organ| |00000200| 69 7a 61 74 69 6f 6e 3a | 20 53 6f 6d 65 77 68 65 |ization:| Somewhe| |00000210| 72 65 20 70 65 72 70 65 | 6e 64 69 63 75 6c 61 72 |re perpe|ndicular| |00000220| 20 74 6f 20 72 65 61 6c | 69 74 79 2e 2e 2e 0a 4c | to real|ity....L| |00000230| 69 6e 65 73 3a 20 33 32 | 37 0a 0a 0a 20 20 20 20 |ines: 32|7... | |00000240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000250| 20 20 20 20 2a 50 52 4f | 46 45 53 53 49 4f 4e 41 | *PRO|FESSIONA| |00000260| 4c 20 47 45 4d 2a 0a 20 | 20 20 20 20 20 20 20 20 |L GEM*. | | |00000270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000280| 20 20 42 79 20 54 69 6d | 20 4f 72 65 6e 0a 20 20 | By Tim| Oren. | |00000290| 20 20 20 20 20 20 20 20 | 43 6f 6c 75 6d 6e 20 23 | |Column #| |000002a0| 31 32 3a 20 20 47 45 4d | 20 45 76 65 6e 74 73 20 |12: GEM| Events | |000002b0| 61 6e 64 20 50 72 6f 67 | 72 61 6d 20 53 74 72 75 |and Prog|ram Stru| |000002c0| 63 74 75 72 65 0a 0a 20 | 20 20 20 20 53 6f 20 49 |cture.. | So I| |000002d0| 20 66 69 62 62 65 64 20 | 61 20 6c 69 74 74 6c 65 | fibbed |a little| |000002e0| 2e 20 20 54 68 69 73 20 | 69 73 73 75 65 20 28 23 |. This |issue (#| |000002f0| 31 32 29 20 6f 66 20 53 | 54 20 50 52 4f 20 47 45 |12) of S|T PRO GE| |00000300| 4d 20 73 74 61 72 74 65 | 64 0a 6f 75 74 20 74 6f |M starte|d.out to| |00000310| 20 62 65 20 61 6e 6f 74 | 68 65 72 20 64 69 73 63 | be anot|her disc| |00000320| 75 73 73 69 6f 6e 20 6f | 66 20 69 6e 74 65 72 66 |ussion o|f interf| |00000330| 61 63 65 20 69 73 73 75 | 65 73 2e 20 20 42 75 74 |ace issu|es. But| |00000340| 2c 20 61 73 20 54 6f 6c | 6b 69 65 6e 0a 6f 6e 63 |, as Tol|kien.onc| |00000350| 65 20 73 61 69 64 2c 20 | 74 68 65 20 74 61 6c 65 |e said, |the tale| |00000360| 20 67 72 65 77 20 69 6e | 20 74 68 65 20 74 65 6c | grew in| the tel| |00000370| 6c 69 6e 67 2c 20 61 6e | 64 20 74 68 69 73 20 69 |ling, an|d this i| |00000380| 73 20 6e 6f 77 20 74 68 | 65 20 66 69 72 73 74 0a |s now th|e first.| |00000390| 6f 66 20 20 61 20 73 65 | 72 69 65 73 20 6f 66 20 |of a se|ries of | |000003a0| 74 68 72 65 65 20 61 72 | 74 69 63 6c 65 73 2e 20 |three ar|ticles. | |000003b0| 20 20 54 68 69 73 20 70 | 61 72 74 20 77 69 6c 6c | This p|art will| |000003c0| 20 64 69 73 63 75 73 73 | 20 41 45 53 20 65 76 65 | discuss| AES eve| |000003d0| 6e 74 0a 68 61 6e 64 6c | 69 6e 67 20 20 61 6e 64 |nt.handl|ing and| |000003e0| 20 20 69 74 73 20 69 6d | 70 6c 69 63 61 74 69 6f | its im|plicatio| |000003f0| 6e 73 20 66 6f 72 20 47 | 45 4d 20 20 70 72 6f 67 |ns for G|EM prog| |00000400| 72 61 6d 20 20 73 74 72 | 75 63 74 75 72 65 2e 20 |ram str|ucture. | |00000410| 20 20 54 68 65 0a 66 6f | 6c 6c 6f 77 69 6e 67 20 | The.fo|llowing | |00000420| 20 61 72 74 69 63 6c 65 | 20 77 69 6c 6c 20 63 6f | article| will co| |00000430| 6e 74 61 69 6e 20 61 20 | 22 68 6f 6d 65 20 62 72 |ntain a |"home br| |00000440| 65 77 22 20 64 69 61 6c | 6f 67 20 68 61 6e 64 6c |ew" dial|og handl| |00000450| 65 72 20 20 77 69 74 68 | 0a 73 6f 6d 65 20 20 6e |er with|.some n| |00000460| 65 77 20 20 66 65 61 74 | 75 72 65 73 2c 20 20 61 |ew feat|ures, a| |00000470| 6e 64 20 20 74 68 65 20 | 74 68 69 72 64 20 77 69 |nd the |third wi| |00000480| 6c 6c 2c 20 20 66 69 6e | 61 6c 6c 79 2c 20 20 74 |ll, fin|ally, t| |00000490| 61 6b 65 20 75 70 20 20 | 74 68 65 0a 64 69 73 63 |ake up |the.disc| |000004a0| 75 73 73 69 6f 6e 20 20 | 6f 66 20 20 69 6e 74 65 |ussion |of inte| |000004b0| 72 66 61 63 65 20 64 65 | 73 69 67 6e 2c 20 20 75 |rface de|sign, u| |000004c0| 73 69 6e 67 20 74 68 65 | 20 64 69 61 6c 6f 67 20 |sing the| dialog | |000004d0| 68 61 6e 64 6c 65 72 20 | 61 73 20 20 61 6e 0a 65 |handler |as an.e| |000004e0| 78 61 6d 70 6c 65 2e 20 | 20 20 28 54 68 65 72 65 |xample. | (There| |000004f0| 20 69 73 20 6e 6f 20 64 | 6f 77 6e 6c 6f 61 64 20 | is no d|ownload | |00000500| 66 6f 72 20 74 68 69 73 | 20 61 72 74 69 63 6c 65 |for this| article| |00000510| 2e 20 20 20 54 68 65 20 | 64 6f 77 6e 6c 6f 61 64 |. The |download| |00000520| 73 0a 77 69 6c 6c 20 72 | 65 74 75 72 6e 2c 20 77 |s.will r|eturn, w| |00000530| 69 74 68 20 61 20 76 65 | 6e 67 65 61 6e 63 65 2c |ith a ve|ngeance,| |00000540| 20 69 6e 20 53 54 20 50 | 52 4f 20 47 45 4d 20 23 | in ST P|RO GEM #| |00000550| 31 33 2e 29 0a 0a 20 20 | 20 20 20 41 4c 4c 20 46 |13.).. | ALL F| |00000560| 4f 52 20 4f 4e 45 2c 20 | 20 41 4e 44 20 4f 4e 45 |OR ONE, | AND ONE| |00000570| 20 46 4f 52 20 41 4c 4c | 2e 20 20 41 20 71 75 69 | FOR ALL|. A qui| |00000580| 63 6b 20 69 6e 73 70 65 | 63 74 69 6f 6e 20 6f 66 |ck inspe|ction of| |00000590| 20 74 68 65 20 41 45 53 | 0a 64 6f 63 75 6d 65 6e | the AES|.documen| |000005a0| 74 73 20 20 73 68 6f 77 | 73 20 74 68 61 74 20 74 |ts show|s that t| |000005b0| 68 65 72 65 20 61 72 65 | 20 66 69 76 65 20 72 6f |here are| five ro| |000005c0| 75 74 69 6e 65 73 20 64 | 65 76 6f 74 65 64 20 20 |utines d|evoted | |000005d0| 74 6f 20 20 77 61 69 74 | 69 6e 67 0a 66 6f 72 20 |to wait|ing.for | |000005e0| 69 6e 64 69 76 69 64 75 | 61 6c 20 74 79 70 65 73 |individu|al types| |000005f0| 20 6f 66 20 65 76 65 6e | 74 73 2c 20 61 6e 64 20 | of even|ts, and | |00000600| 6f 6e 65 20 72 6f 75 74 | 69 6e 65 2c 20 65 76 6e |one rout|ine, evn| |00000610| 74 5f 6d 75 6c 74 69 2c | 20 77 68 69 63 68 0a 69 |t_multi,| which.i| |00000620| 73 20 20 75 73 65 64 20 | 20 77 68 65 6e 20 6d 6f |s used | when mo| |00000630| 72 65 20 74 68 61 6e 20 | 6f 6e 65 20 74 79 70 65 |re than |one type| |00000640| 20 69 73 20 64 65 73 69 | 72 65 64 2e 20 20 20 54 | is desi|red. T| |00000650| 68 69 73 20 61 72 74 69 | 63 6c 65 20 20 77 69 6c |his arti|cle wil| |00000660| 6c 0a 64 69 73 63 75 73 | 73 20 20 4f 4e 4c 59 20 |l.discus|s ONLY | |00000670| 65 76 6e 74 5f 6d 75 6c | 74 69 20 66 6f 72 20 74 |evnt_mul|ti for t| |00000680| 77 6f 20 72 65 61 73 6f | 6e 73 2e 20 20 20 46 69 |wo reaso|ns. Fi| |00000690| 72 73 74 2c 20 20 69 74 | 20 69 73 20 74 68 65 20 |rst, it| is the | |000006a0| 6d 6f 73 74 0a 66 72 65 | 71 75 65 6e 74 6c 79 20 |most.fre|quently | |000006b0| 75 73 65 64 20 6f 66 20 | 74 68 65 20 72 6f 75 74 |used of |the rout| |000006c0| 69 6e 65 73 2e 20 20 20 | 53 65 63 6f 6e 64 2c 20 |ines. |Second, | |000006d0| 77 61 69 74 69 6e 67 20 | 66 6f 72 20 6f 6e 65 20 |waiting |for one | |000006e0| 74 79 70 65 20 6f 66 0a | 65 76 65 6e 74 20 69 73 |type of.|event is| |000006f0| 20 61 20 62 61 64 20 70 | 72 61 63 74 69 63 65 2e | a bad p|ractice.| |00000700| 20 20 20 41 6e 79 20 65 | 76 65 6e 74 20 63 61 6c | Any e|vent cal| |00000710| 6c 20 74 75 72 6e 73 20 | 74 68 65 20 73 79 73 74 |l turns |the syst| |00000720| 65 6d 20 6f 76 65 72 20 | 74 6f 0a 74 68 65 20 41 |em over |to.the A| |00000730| 45 53 20 61 6e 64 20 73 | 75 73 70 65 6e 64 73 20 |ES and s|uspends | |00000740| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |the appl|ication | |00000750| 61 6e 64 20 69 74 73 20 | 69 6e 74 65 72 61 63 74 |and its |interact| |00000760| 69 6f 6e 20 77 69 74 68 | 20 20 74 68 65 0a 75 73 |ion with| the.us| |00000770| 65 72 2e 20 20 20 49 6e | 20 20 73 75 63 68 20 20 |er. In| such | |00000780| 63 61 73 65 73 2c 20 20 | 73 6f 6d 65 20 20 22 65 |cases, |some "e| |00000790| 73 63 61 70 65 20 63 6c | 61 75 73 65 22 2c 20 20 |scape cl|ause", | |000007a0| 73 75 63 68 20 61 73 20 | 61 20 74 69 6d 65 72 2c |such as |a timer,| |000007b0| 0a 73 68 6f 75 6c 64 20 | 62 65 20 69 6e 73 65 72 |.should |be inser| |000007c0| 74 65 64 20 74 6f 20 72 | 65 76 69 76 65 20 74 68 |ted to r|evive th| |000007d0| 65 20 70 72 6f 67 72 61 | 6d 20 61 6e 64 20 70 72 |e progra|m and pr| |000007e0| 6f 6d 70 74 20 74 68 65 | 20 75 73 65 72 20 69 66 |ompt the| user if| |000007f0| 20 6e 6f 0a 65 76 65 6e | 74 20 20 69 73 20 20 66 | no.even|t is f| |00000800| 6f 72 74 68 63 6f 6d 69 | 6e 67 2e 20 20 20 4f 74 |orthcomi|ng. Ot| |00000810| 68 65 72 77 69 73 65 2c | 20 20 74 68 65 20 20 61 |herwise,| the a| |00000820| 70 70 6c 69 63 61 74 69 | 6f 6e 20 6d 61 79 20 65 |pplicati|on may e| |00000830| 6e 64 20 20 75 70 0a 61 | 70 70 61 72 65 6e 74 6c |nd up.a|pparentl| |00000840| 79 20 20 28 6f 72 20 20 | 61 63 74 75 61 6c 6c 79 |y (or |actually| |00000850| 29 20 20 68 75 6e 67 2c | 20 20 77 69 74 68 20 61 |) hung,| with a| |00000860| 20 20 72 65 73 75 6c 74 | 69 6e 67 20 20 72 65 62 | result|ing reb| |00000870| 6f 6f 74 2c 20 20 61 6e | 64 0a 70 72 6f 62 61 62 |oot, an|d.probab| |00000880| 6c 79 20 61 20 76 65 72 | 79 20 61 6e 6e 6f 79 65 |ly a ver|y annoye| |00000890| 64 20 75 73 65 72 2e 0a | 0a 20 20 20 20 20 53 54 |d user..|. ST| |000008a0| 41 52 54 49 4e 47 20 20 | 41 48 45 41 44 2e 20 20 |ARTING |AHEAD. | |000008b0| 20 4f 6e 65 20 20 70 6f | 73 73 69 62 6c 65 20 74 | One po|ssible t| |000008c0| 79 70 65 20 6f 66 20 65 | 76 65 6e 74 20 69 73 20 |ype of e|vent is | |000008d0| 61 20 20 6d 65 73 73 61 | 67 65 2e 0a 4d 65 73 73 |a messa|ge..Mess| |000008e0| 61 67 65 73 20 20 61 72 | 65 20 75 73 75 61 6c 6c |ages ar|e usuall| |000008f0| 79 20 73 65 6e 74 20 74 | 6f 20 74 68 65 20 61 70 |y sent t|o the ap| |00000900| 70 6c 69 63 61 74 69 6f | 6e 20 62 79 20 74 68 65 |plicatio|n by the| |00000910| 20 41 45 53 2c 20 20 61 | 6e 64 20 61 72 65 0a 61 | AES, a|nd are.a| |00000920| 73 73 6f 63 69 61 74 65 | 64 20 20 77 69 74 68 20 |ssociate|d with | |00000930| 20 77 69 6e 64 6f 77 73 | 20 6f 72 20 74 68 65 20 | windows| or the | |00000940| 6d 65 6e 75 2e 20 20 20 | 54 77 6f 20 70 72 65 76 |menu. |Two prev| |00000950| 69 6f 75 73 20 61 72 74 | 69 63 6c 65 73 20 20 69 |ious art|icles i| |00000960| 6e 0a 74 68 69 73 20 20 | 73 65 72 69 65 73 20 68 |n.this |series h| |00000970| 61 76 65 20 64 69 73 63 | 75 73 73 65 64 20 73 75 |ave disc|ussed su| |00000980| 63 68 20 6d 65 73 73 61 | 67 65 73 2e 20 20 20 53 |ch messa|ges. S| |00000990| 54 20 50 52 4f 20 47 45 | 4d 20 6e 75 6d 62 65 72 |T PRO GE|M number| |000009a0| 20 74 77 6f 0a 63 6f 6e | 73 69 64 65 72 65 64 20 | two.con|sidered | |000009b0| 20 20 77 69 6e 64 6f 77 | 20 20 6d 65 73 73 61 67 | window| messag| |000009c0| 65 73 2c 20 20 20 61 6e | 64 20 20 6e 75 6d 62 65 |es, an|d numbe| |000009d0| 72 20 20 73 65 76 65 6e | 20 20 68 61 6e 64 6c 65 |r seven| handle| |000009e0| 64 20 20 6d 65 6e 75 0a | 6d 65 73 73 61 67 65 73 |d menu.|messages| |000009f0| 2e 20 20 59 6f 75 20 6d | 61 79 20 77 61 6e 74 20 |. You m|ay want | |00000a00| 74 6f 20 72 65 76 69 65 | 77 20 74 68 65 73 65 20 |to revie|w these | |00000a10| 74 6f 70 69 63 73 20 62 | 65 66 6f 72 65 20 70 72 |topics b|efore pr| |00000a20| 6f 63 65 65 64 69 6e 67 | 2e 0a 0a 20 20 20 20 20 |oceeding|... | |00000a30| 54 68 65 20 61 63 74 75 | 61 6c 20 65 76 6e 74 5f |The actu|al evnt_| |00000a40| 6d 75 6c 74 69 20 63 61 | 6c 6c 20 69 73 20 61 20 |multi ca|ll is a | |00000a50| 68 6f 72 72 65 6e 64 6f | 75 73 20 74 68 69 6e 67 |horrendo|us thing| |00000a60| 3a 0a 0a 20 20 20 20 20 | 65 76 5f 77 68 69 63 68 |:.. |ev_which| |00000a70| 20 3d 20 65 76 6e 74 5f | 6d 75 6c 74 69 28 65 76 | = evnt_|multi(ev| |00000a80| 5f 66 6c 61 67 73 2c 0a | 20 20 20 20 20 20 20 20 |_flags,.| | |00000a90| 20 20 20 20 20 20 20 62 | 74 6e 5f 63 6c 69 63 6b | b|tn_click| |00000aa0| 73 2c 20 62 74 6e 5f 6d | 61 73 6b 2c 20 62 74 6e |s, btn_m|ask, btn| |00000ab0| 5f 73 74 61 74 65 2c 0a | 20 20 20 20 20 20 20 20 |_state,.| | |00000ac0| 20 20 20 20 20 20 20 72 | 31 5f 66 6c 61 67 73 2c | r|1_flags,| |00000ad0| 20 72 31 5f 78 2c 20 72 | 31 5f 79 2c 20 72 31 5f | r1_x, r|1_y, r1_| |00000ae0| 77 2c 20 72 31 5f 68 2c | 0a 20 20 20 20 20 20 20 |w, r1_h,|. | |00000af0| 20 20 20 20 20 20 20 20 | 72 32 5f 66 6c 61 67 73 | |r2_flags| |00000b00| 2c 20 72 32 5f 78 2c 20 | 72 32 5f 79 2c 20 72 32 |, r2_x, |r2_y, r2| |00000b10| 5f 77 2c 20 72 32 5f 68 | 2c 0a 20 20 20 20 20 20 |_w, r2_h|,. | |00000b20| 20 20 20 20 20 20 20 20 | 20 26 6d 73 67 5f 62 75 | | &msg_bu| |00000b30| 66 66 2c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ff,. | | |00000b40| 20 20 20 74 69 6d 65 5f | 6c 6f 2c 20 74 69 6d 65 | time_|lo, time| |00000b50| 5f 68 69 2c 0a 20 20 20 | 20 20 20 20 20 20 20 20 |_hi,. | | |00000b60| 20 20 20 20 26 6d 78 2c | 20 26 6d 79 2c 20 26 62 | &mx,| &my, &b| |00000b70| 74 6e 2c 20 26 6b 62 64 | 2c 20 26 63 68 61 72 2c |tn, &kbd|, &char,| |00000b80| 20 26 63 6c 69 63 6b 73 | 29 3b 0a 0a 45 61 63 68 | &clicks|);..Each| |00000b90| 20 20 6f 66 20 20 74 68 | 65 20 6c 69 6e 65 73 20 | of th|e lines | |00000ba0| 69 6e 20 74 68 65 20 63 | 61 6c 6c 20 72 65 6c 61 |in the c|all rela| |00000bb0| 74 65 20 74 6f 20 61 20 | 64 69 66 66 65 72 65 6e |te to a |differen| |00000bc0| 74 20 20 65 76 65 6e 74 | 2c 20 20 61 6e 64 0a 74 |t event|, and.t| |00000bd0| 68 65 79 20 20 77 69 6c | 6c 20 62 65 20 64 69 73 |hey wil|l be dis| |00000be0| 63 75 73 73 65 64 20 69 | 6e 20 74 68 65 20 6f 72 |cussed i|n the or| |00000bf0| 64 65 72 20 69 6e 20 77 | 68 69 63 68 20 74 68 65 |der in w|hich the| |00000c00| 79 20 20 61 70 70 65 61 | 72 2e 0a 0a 20 20 20 20 |y appea|r... | |00000c10| 20 4e 6f 74 65 20 20 74 | 68 61 74 20 61 20 63 61 | Note t|hat a ca| |00000c20| 6c 6c 20 77 69 74 68 20 | 74 68 69 73 20 6e 75 6d |ll with |this num| |00000c30| 62 65 72 20 6f 66 20 70 | 61 72 61 6d 65 74 65 72 |ber of p|arameter| |00000c40| 73 20 63 61 75 73 65 73 | 20 20 73 6f 6d 65 0a 6f |s causes| some.o| |00000c50| 76 65 72 68 65 61 64 20 | 20 64 75 65 20 20 74 6f |verhead | due to| |00000c60| 20 73 74 61 63 6b 69 6e | 67 20 61 6e 64 20 72 65 | stackin|g and re| |00000c70| 74 72 69 65 76 61 6c 20 | 6f 66 20 74 68 65 20 76 |trieval |of the v| |00000c80| 61 6c 75 65 73 2e 20 20 | 20 49 6e 20 20 6d 6f 73 |alues. | In mos| |00000c90| 74 0a 63 61 73 65 73 2c | 20 20 74 68 69 73 20 20 |t.cases,| this | |00000ca0| 73 68 6f 75 6c 64 20 62 | 65 20 6f 66 20 6c 69 74 |should b|e of lit| |00000cb0| 74 6c 65 20 63 6f 6e 63 | 65 72 6e 20 6f 6e 20 61 |tle conc|ern on a| |00000cc0| 20 6d 61 63 68 69 6e 65 | 20 61 73 20 66 61 73 74 | machine| as fast| |00000cd0| 20 20 61 73 0a 74 68 65 | 20 53 54 2e 20 20 20 48 | as.the| ST. H| |00000ce0| 6f 77 65 76 65 72 2c 20 | 77 68 65 72 65 20 74 68 |owever, |where th| |00000cf0| 72 6f 75 67 68 70 75 74 | 20 69 73 20 61 20 63 6f |roughput| is a co| |00000d00| 6e 63 65 72 6e 2c 20 73 | 75 63 68 20 61 73 20 69 |ncern, s|uch as i| |00000d10| 6e 20 63 6c 6f 73 65 0a | 74 72 61 63 6b 69 6e 67 |n close.|tracking| |00000d20| 20 20 6f 66 20 74 68 65 | 20 6d 6f 75 73 65 20 63 | of the| mouse c| |00000d30| 75 72 73 6f 72 2c 20 20 | 79 6f 75 20 6d 61 79 20 |ursor, |you may | |00000d40| 77 61 6e 74 20 74 6f 20 | 77 72 69 74 65 20 61 20 |want to |write a | |00000d50| 63 75 73 74 6f 6d 69 7a | 65 64 0a 62 69 6e 64 69 |customiz|ed.bindi| |00000d60| 6e 67 20 20 66 6f 72 20 | 65 76 6e 74 5f 6d 75 6c |ng for |evnt_mul| |00000d70| 74 69 20 77 68 69 63 68 | 20 64 69 73 70 65 6e 73 |ti which| dispens| |00000d80| 65 73 20 77 69 74 68 20 | 74 68 65 20 20 70 61 72 |es with |the par| |00000d90| 61 6d 65 74 65 72 20 20 | 6c 69 73 74 2e 0a 54 68 |ameter |list..Th| |00000da0| 69 73 20 20 63 61 6e 20 | 20 62 65 20 61 63 63 6f |is can | be acco| |00000db0| 6d 70 6c 69 73 68 65 64 | 20 62 79 20 6d 61 69 6e |mplished| by main| |00000dc0| 74 61 69 6e 69 6e 67 20 | 74 68 65 20 76 61 6c 75 |taining |the valu| |00000dd0| 65 73 20 69 6e 20 20 61 | 20 20 73 74 61 74 69 63 |es in a| static| |00000de0| 0a 61 72 72 61 79 20 20 | 61 6e 64 20 6d 6f 76 69 |.array |and movi| |00000df0| 6e 67 20 74 68 65 6d 20 | 61 73 20 61 20 62 6c 6f |ng them |as a blo| |00000e00| 63 6b 20 69 6e 74 6f 20 | 74 68 65 20 62 69 6e 64 |ck into |the bind| |00000e10| 69 6e 67 20 20 61 72 72 | 61 79 73 20 20 69 6e 74 |ing arr|ays int| |00000e20| 5f 69 6e 0a 28 66 6f 72 | 20 61 6c 6c 20 76 61 6c |_in.(for| all val| |00000e30| 75 65 73 20 62 75 74 20 | 26 6d 73 67 5f 62 75 66 |ues but |&msg_buf| |00000e40| 66 29 2c 20 61 6e 64 20 | 61 64 64 72 5f 69 6e 20 |f), and |addr_in | |00000e50| 28 66 6f 72 20 26 6d 73 | 67 5f 62 75 66 66 29 2e |(for &ms|g_buff).| |00000e60| 20 20 4e 6f 74 65 0a 74 | 68 61 74 20 20 79 6f 75 | Note.t|hat you| |00000e70| 20 20 6d 61 79 20 4e 4f | 54 20 73 69 6d 70 6c 79 | may NO|T simply| |00000e80| 20 6c 65 61 76 65 20 74 | 68 65 20 76 61 6c 75 65 | leave t|he value| |00000e90| 73 20 69 6e 20 20 69 6e | 74 5f 69 6e 3b 20 20 6f |s in in|t_in; o| |00000ea0| 74 68 65 72 20 20 41 45 | 53 0a 62 69 6e 64 69 6e |ther AE|S.bindin| |00000eb0| 67 73 20 72 65 75 73 65 | 20 74 68 69 73 20 73 70 |gs reuse| this sp| |00000ec0| 61 63 65 2e 0a 0a 20 20 | 20 20 20 45 76 5f 66 6c |ace... | Ev_fl| |00000ed0| 61 67 73 20 20 61 6e 64 | 20 65 76 5f 77 68 69 63 |ags and| ev_whic| |00000ee0| 68 20 61 72 65 20 62 6f | 74 68 20 31 36 2d 62 69 |h are bo|th 16-bi| |00000ef0| 74 20 69 6e 74 65 67 65 | 72 73 20 20 63 6f 6d 70 |t intege|rs comp| |00000f00| 6f 73 65 64 20 20 6f 66 | 0a 66 6c 61 67 20 62 69 |osed of|.flag bi| |00000f10| 74 73 2e 20 20 42 69 74 | 73 20 73 65 74 20 69 6e |ts. Bit|s set in| |00000f20| 20 65 76 5f 66 6c 61 67 | 73 20 64 65 74 65 72 6d | ev_flag|s determ| |00000f30| 69 6e 65 20 77 68 69 63 | 68 20 65 76 65 6e 74 28 |ine whic|h event(| |00000f40| 73 29 20 74 68 65 20 63 | 61 6c 6c 0a 77 69 6c 6c |s) the c|all.will| |00000f50| 20 20 77 61 69 74 20 20 | 66 6f 72 3b 20 20 74 68 | wait |for; th| |00000f60| 6f 73 65 20 20 73 65 74 | 20 69 6e 20 65 76 5f 77 |ose set| in ev_w| |00000f70| 68 69 63 68 20 20 69 6e | 64 69 63 61 74 65 20 20 |hich in|dicate | |00000f80| 77 68 61 74 20 20 65 76 | 65 6e 74 28 73 29 0a 61 |what ev|ent(s).a| |00000f90| 63 74 75 61 6c 6c 79 20 | 6f 63 63 75 72 72 65 64 |ctually |occurred| |00000fa0| 2e 20 20 20 42 6f 74 68 | 20 75 73 65 20 74 68 65 |. Both| use the| |00000fb0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 66 6c 61 67 20 | followi|ng flag | |00000fc0| 62 69 74 20 6d 6e 65 6d | 6f 6e 69 63 73 20 61 6e |bit mnem|onics an| |00000fd0| 64 0a 66 75 6e 63 74 69 | 6f 6e 73 3a 0a 0a 20 20 |d.functi|ons:.. | |00000fe0| 20 20 20 30 78 30 30 30 | 31 20 2d 20 4d 55 5f 4b | 0x000|1 - MU_K| |00000ff0| 45 59 42 44 20 2d 20 4b | 65 79 62 6f 61 72 64 20 |EYBD - K|eyboard | |00001000| 69 6e 70 75 74 0a 20 20 | 20 20 20 30 78 30 30 30 |input. | 0x000| |00001010| 32 20 2d 20 4d 55 5f 42 | 55 54 54 4f 4e 20 2d 20 |2 - MU_B|UTTON - | |00001020| 4d 6f 75 73 65 20 62 75 | 74 74 6f 6e 28 73 29 0a |Mouse bu|tton(s).| |00001030| 20 20 20 20 20 30 78 30 | 30 30 34 20 2d 20 4d 55 | 0x0|004 - MU| |00001040| 5f 4d 31 20 2d 20 4d 6f | 75 73 65 20 72 65 63 74 |_M1 - Mo|use rect| |00001050| 61 6e 67 6c 65 20 23 31 | 0a 20 20 20 20 20 30 78 |angle #1|. 0x| |00001060| 30 30 30 38 20 2d 20 4d | 55 5f 4d 32 20 2d 20 4d |0008 - M|U_M2 - M| |00001070| 6f 75 73 65 20 72 65 63 | 74 61 6e 67 6c 65 20 23 |ouse rec|tangle #| |00001080| 32 0a 20 20 20 20 20 30 | 78 30 30 31 30 20 2d 20 |2. 0|x0010 - | |00001090| 4d 55 5f 4d 45 53 41 47 | 20 2d 20 41 45 53 20 6d |MU_MESAG| - AES m| |000010a0| 65 73 73 61 67 65 0a 20 | 20 20 20 20 30 78 30 30 |essage. | 0x00| |000010b0| 32 30 20 2d 20 4d 55 5f | 54 49 4d 45 52 20 2d 20 |20 - MU_|TIMER - | |000010c0| 54 69 6d 65 72 0a 0a 54 | 68 65 20 20 61 70 70 72 |Timer..T|he appr| |000010d0| 6f 70 72 69 61 74 65 20 | 6d 6e 65 6d 6f 6e 69 63 |opriate |mnemonic| |000010e0| 73 20 61 72 65 20 4f 52 | 65 64 20 74 6f 67 65 74 |s are OR|ed toget| |000010f0| 68 65 72 20 74 6f 20 63 | 72 65 61 74 65 20 74 68 |her to c|reate th| |00001100| 65 20 20 70 72 6f 70 65 | 72 0a 65 76 5f 66 6c 61 |e prope|r.ev_fla| |00001110| 67 73 20 76 61 6c 75 65 | 2e 0a 0a 20 20 20 20 20 |gs value|... | |00001120| 54 68 65 72 65 20 20 69 | 73 20 20 6f 6e 65 20 20 |There i|s one | |00001130| 63 6f 6d 6d 6f 6e 20 70 | 69 74 66 61 6c 6c 20 68 |common p|itfall h| |00001140| 65 72 65 2e 20 20 20 4e | 6f 74 69 63 65 20 20 74 |ere. N|otice t| |00001150| 68 61 74 20 20 6d 75 6c | 74 69 70 6c 65 0a 65 76 |hat mul|tiple.ev| |00001160| 65 6e 74 73 20 20 6d 61 | 79 20 20 62 65 20 72 65 |ents ma|y be re| |00001170| 70 6f 72 74 65 64 20 66 | 72 6f 6d 20 6f 6e 65 20 |ported f|rom one | |00001180| 65 76 6e 74 5f 6d 75 6c | 74 69 2e 20 20 20 45 76 |evnt_mul|ti. Ev| |00001190| 65 6e 74 20 20 6d 65 72 | 67 69 6e 67 20 20 69 73 |ent mer|ging is| |000011a0| 0a 70 65 72 66 6f 72 6d | 65 64 20 20 62 79 20 74 |.perform|ed by t| |000011b0| 68 65 20 41 45 53 20 69 | 6e 20 6f 72 64 65 72 20 |he AES i|n order | |000011c0| 74 6f 20 73 61 76 65 20 | 73 70 61 63 65 20 6f 6e |to save |space on| |000011d0| 20 74 68 65 20 20 61 70 | 70 6c 69 63 61 74 69 6f | the ap|plicatio| |000011e0| 6e 27 73 0a 65 76 65 6e | 74 20 71 75 65 75 65 2e |n's.even|t queue.| |000011f0| 20 20 20 49 66 20 65 76 | 65 6e 74 73 20 68 61 76 | If ev|ents hav| |00001200| 65 20 62 65 65 6e 20 6d | 65 72 67 65 64 2c 20 20 |e been m|erged, | |00001210| 6d 6f 72 65 20 74 68 61 | 6e 20 6f 6e 65 20 62 69 |more tha|n one bi| |00001220| 74 20 77 69 6c 6c 0a 62 | 65 20 20 73 65 74 20 69 |t will.b|e set i| |00001230| 6e 20 74 68 65 20 65 76 | 5f 77 68 69 63 68 20 77 |n the ev|_which w| |00001240| 6f 72 64 2e 20 20 20 59 | 6f 75 72 20 61 70 70 6c |ord. Y|our appl| |00001250| 69 63 61 74 69 6f 6e 20 | 6d 75 73 74 20 63 68 65 |ication |must che| |00001260| 63 6b 20 41 4c 4c 20 6f | 66 0a 74 68 65 20 20 62 |ck ALL o|f.the b| |00001270| 69 74 73 20 20 62 65 66 | 6f 72 65 20 20 72 65 74 |its bef|ore ret| |00001280| 75 72 6e 69 6e 67 20 74 | 6f 20 61 20 6e 65 77 20 |urning t|o a new | |00001290| 20 65 76 6e 74 5f 6d 75 | 6c 74 69 20 20 63 61 6c | evnt_mu|lti cal| |000012a0| 6c 2e 20 20 20 49 66 20 | 20 79 6f 75 0a 64 6f 6e |l. If | you.don| |000012b0| 27 74 20 64 6f 20 74 68 | 69 73 2c 20 73 6f 6d 65 |'t do th|is, some| |000012c0| 20 65 76 65 6e 74 73 20 | 6d 61 79 20 62 65 20 65 | events |may be e| |000012d0| 66 66 65 63 74 69 76 65 | 6c 79 20 6c 6f 73 74 2e |ffective|ly lost.| |000012e0| 0a 0a 20 20 20 20 20 54 | 68 65 20 20 66 69 72 73 |.. T|he firs| |000012f0| 74 20 65 76 65 6e 74 20 | 74 6f 20 62 65 20 63 6f |t event |to be co| |00001300| 6e 73 69 64 65 72 65 64 | 20 69 73 20 74 68 65 20 |nsidered| is the | |00001310| 6d 6f 75 73 65 20 62 75 | 74 74 6f 6e 2e 20 20 20 |mouse bu|tton. | |00001320| 54 68 69 73 0a 69 73 20 | 70 72 6f 62 61 62 6c 79 |This.is |probably| |00001330| 20 74 68 65 20 6d 6f 73 | 74 20 64 69 66 66 69 63 | the mos|t diffic| |00001340| 75 6c 74 20 65 76 65 6e | 74 20 74 6f 20 75 6e 64 |ult even|t to und| |00001350| 65 72 73 74 61 6e 64 20 | 61 6e 64 20 75 73 65 2c |erstand |and use,| |00001360| 20 61 6e 64 20 69 74 0a | 68 61 73 20 6f 6e 65 20 | and it.|has one | |00001370| 6d 61 6a 6f 72 20 73 68 | 6f 72 74 63 6f 6d 69 6e |major sh|ortcomin| |00001380| 67 2e 0a 0a 20 20 20 20 | 20 54 68 65 20 20 70 61 |g... | The pa| |00001390| 72 61 6d 65 74 65 72 20 | 20 62 74 6e 5f 63 6c 69 |rameter | btn_cli| |000013a0| 63 6b 73 20 74 65 6c 6c | 73 20 47 45 4d 20 74 68 |cks tell|s GEM th| |000013b0| 65 20 20 6d 61 78 69 6d | 75 6d 20 20 6e 75 6d 62 |e maxim|um numb| |000013c0| 65 72 20 20 6f 66 0a 63 | 6c 69 63 6b 73 20 77 68 |er of.c|licks wh| |000013d0| 69 63 68 20 79 6f 75 20 | 61 72 65 20 69 6e 74 65 |ich you |are inte| |000013e0| 72 65 73 74 65 64 20 69 | 6e 20 73 65 65 69 6e 67 |rested i|n seeing| |000013f0| 2e 20 20 20 54 68 69 73 | 20 76 61 6c 75 65 20 69 |. This| value i| |00001400| 73 20 75 73 75 61 6c 6c | 79 0a 74 77 6f 2c 20 20 |s usuall|y.two, | |00001410| 69 66 20 79 6f 75 72 20 | 70 72 6f 67 72 61 6d 20 |if your |program | |00001420| 75 73 65 73 20 74 68 65 | 20 64 6f 75 62 6c 65 2d |uses the| double-| |00001430| 63 6c 69 63 6b 20 6d 65 | 74 68 6f 64 2c 20 6f 72 |click me|thod, or| |00001440| 20 6f 6e 65 20 69 66 20 | 6f 6e 6c 79 0a 73 69 6e | one if |only.sin| |00001450| 67 6c 65 20 20 63 6c 69 | 63 6b 73 20 20 61 72 65 |gle cli|cks are| |00001460| 20 75 73 65 64 2e 20 20 | 20 54 68 65 20 41 45 53 | used. | The AES| |00001470| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 6e 75 6d | returns| the num| |00001480| 62 65 72 20 20 6f 66 20 | 20 63 6c 69 63 6b 73 0a |ber of | clicks.| |00001490| 77 68 69 63 68 20 63 61 | 75 73 65 64 20 74 68 65 |which ca|used the| |000014a0| 20 65 76 65 6e 74 20 74 | 68 72 6f 75 67 68 20 26 | event t|hrough &| |000014b0| 63 6c 69 63 6b 73 2c 20 | 77 68 69 63 68 20 6d 75 |clicks, |which mu| |000014c0| 73 74 20 62 65 20 61 20 | 70 6f 69 6e 74 65 72 20 |st be a |pointer | |000014d0| 74 6f 0a 61 20 77 6f 72 | 64 2e 0a 0a 20 20 20 20 |to.a wor|d... | |000014e0| 20 47 45 4d 20 64 65 74 | 65 72 6d 69 6e 65 73 20 | GEM det|ermines | |000014f0| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 63 6c |the numb|er of cl| |00001500| 69 63 6b 73 20 62 79 20 | 74 68 65 20 66 6f 6c 6c |icks by |the foll| |00001510| 6f 77 69 6e 67 20 20 6d | 65 74 68 6f 64 2e 0a 57 |owing m|ethod..W| |00001520| 68 65 6e 20 74 68 65 20 | 66 69 72 73 74 20 62 75 |hen the |first bu| |00001530| 74 74 6f 6e 2d 64 6f 77 | 6e 20 69 73 20 64 65 74 |tton-dow|n is det| |00001540| 65 63 74 65 64 2c 20 61 | 20 74 69 6d 65 20 64 65 |ected, a| time de| |00001550| 6c 61 79 20 69 73 20 62 | 65 67 75 6e 2e 20 20 49 |lay is b|egun. I| |00001560| 66 0a 61 6e 6f 74 68 65 | 72 20 20 63 6f 6d 70 6c |f.anothe|r compl| |00001570| 65 74 65 20 62 75 74 74 | 6f 6e 2d 75 70 2c 20 20 |ete butt|on-up, | |00001580| 62 75 74 74 6f 6e 2d 64 | 6f 77 6e 20 63 79 63 6c |button-d|own cycl| |00001590| 65 20 69 73 20 64 65 74 | 65 63 74 65 64 20 62 65 |e is det|ected be| |000015a0| 66 6f 72 65 0a 74 68 65 | 20 74 69 6d 65 20 65 78 |fore.the| time ex| |000015b0| 70 69 72 65 73 2c 20 20 | 74 68 65 6e 20 74 68 65 |pires, |then the| |000015c0| 20 72 65 73 75 6c 74 20 | 69 73 20 61 20 64 6f 75 | result |is a dou| |000015d0| 62 6c 65 20 63 6c 69 63 | 6b 2e 20 20 20 4f 74 68 |ble clic|k. Oth| |000015e0| 65 72 77 69 73 65 2c 0a | 74 68 65 20 20 65 76 65 |erwise,.|the eve| |000015f0| 6e 74 20 69 73 20 61 20 | 73 69 6e 67 6c 65 20 63 |nt is a |single c| |00001600| 6c 69 63 6b 2e 20 20 20 | 20 4e 6f 74 65 20 74 68 |lick. | Note th| |00001610| 61 74 20 74 68 65 20 66 | 69 6e 61 6c 20 73 74 61 |at the f|inal sta| |00001620| 74 65 20 6f 66 20 20 74 | 68 65 0a 62 75 74 74 6f |te of t|he.butto| |00001630| 6e 73 20 20 69 73 20 20 | 72 65 74 75 72 6e 65 64 |ns is |returned| |00001640| 20 76 69 61 20 26 62 74 | 6e 2c 20 20 61 73 20 64 | via &bt|n, as d| |00001650| 65 73 63 72 69 62 65 64 | 20 62 65 6c 6f 77 2e 20 |escribed| below. | |00001660| 20 20 42 79 20 63 68 65 | 63 6b 69 6e 67 0a 74 68 | By che|cking.th| |00001670| 69 73 20 20 66 69 6e 61 | 6c 20 73 74 61 74 65 2c |is fina|l state,| |00001680| 20 20 79 6f 75 20 6d 61 | 79 20 64 65 74 65 72 6d | you ma|y determ| |00001690| 69 6e 65 20 77 68 65 74 | 68 65 72 20 61 20 73 69 |ine whet|her a si| |000016a0| 6e 67 6c 65 20 63 6c 69 | 63 6b 20 65 76 65 6e 74 |ngle cli|ck event| |000016b0| 0a 65 6e 64 65 64 20 77 | 69 74 68 20 74 68 65 20 |.ended w|ith the | |000016c0| 62 75 74 74 6f 6e 20 75 | 70 20 28 61 20 66 75 6c |button u|p (a ful| |000016d0| 6c 20 63 6c 69 63 6b 29 | 2c 20 20 6f 72 20 77 69 |l click)|, or wi| |000016e0| 74 68 20 74 68 65 20 62 | 75 74 74 6f 6e 20 73 74 |th the b|utton st| |000016f0| 69 6c 6c 0a 64 6f 77 6e | 20 20 28 77 68 69 63 68 |ill.down| (which| |00001700| 20 20 6d 61 79 20 20 62 | 65 20 20 69 6e 74 65 72 | may b|e inter| |00001710| 70 72 65 74 65 64 20 61 | 73 20 20 74 68 65 20 20 |preted a|s the | |00001720| 62 65 67 69 6e 6e 69 6e | 67 20 20 6f 66 20 20 61 |beginnin|g of a| |00001730| 20 20 64 72 61 67 0a 6f | 70 65 72 61 74 69 6f 6e | drag.o|peration| |00001740| 29 2e 20 20 20 44 6f 75 | 62 6c 65 20 63 6c 69 63 |). Dou|ble clic| |00001750| 6b 69 6e 67 20 69 73 20 | 6d 65 61 6e 69 6e 67 6c |king is |meaningl| |00001760| 65 73 73 2c 20 20 61 6e | 64 20 6e 6f 74 20 63 68 |ess, an|d not ch| |00001770| 65 63 6b 65 64 2c 20 69 | 66 0a 74 68 65 20 65 76 |ecked, i|f.the ev| |00001780| 6e 74 5f 6d 75 6c 74 69 | 20 69 73 20 77 61 69 74 |nt_multi| is wait| |00001790| 69 6e 67 20 6f 6e 20 6d | 6f 72 65 20 74 68 61 6e |ing on m|ore than| |000017a0| 20 6f 6e 65 20 62 75 74 | 74 6f 6e 20 28 73 65 65 | one but|ton (see| |000017b0| 20 62 65 6c 6f 77 29 2e | 0a 0a 20 20 20 20 20 54 | below).|.. T| |000017c0| 68 65 20 64 6f 75 62 6c | 65 2d 63 6c 69 63 6b 20 |he doubl|e-click | |000017d0| 64 65 74 65 63 74 69 6f | 6e 20 64 65 6c 61 79 20 |detectio|n delay | |000017e0| 69 73 20 76 61 72 69 61 | 62 6c 65 2c 20 20 61 6e |is varia|ble, an| |000017f0| 64 20 6d 61 79 20 62 65 | 20 73 65 74 0a 62 79 20 |d may be| set.by | |00001800| 79 6f 75 72 20 70 72 6f | 67 72 61 6d 20 75 73 69 |your pro|gram usi| |00001810| 6e 67 20 74 68 65 20 63 | 61 6c 6c 0a 0a 20 20 20 |ng the c|all.. | |00001820| 20 20 65 76 5f 64 73 70 | 65 65 64 20 3d 20 65 76 | ev_dsp|eed = ev| |00001830| 5f 64 63 6c 69 63 6b 28 | 65 76 5f 64 6e 65 77 2c |_dclick(|ev_dnew,| |00001840| 20 65 76 5f 64 66 75 6e | 63 29 3b 0a 0a 45 76 5f | ev_dfun|c);..Ev_| |00001850| 64 66 75 6e 63 20 20 69 | 73 20 61 20 66 6c 61 67 |dfunc i|s a flag| |00001860| 20 77 68 69 63 68 20 64 | 65 74 65 72 6d 69 6e 65 | which d|etermine| |00001870| 73 20 74 68 65 20 70 75 | 72 70 6f 73 65 20 6f 66 |s the pu|rpose of| |00001880| 20 74 68 65 20 63 61 6c | 6c 2e 20 20 20 49 66 0a | the cal|l. If.| |00001890| 69 74 20 20 69 73 20 20 | 7a 65 72 6f 2c 20 20 74 |it is |zero, t| |000018a0| 68 65 20 20 63 75 72 72 | 65 6e 74 20 20 64 6f 75 |he curr|ent dou| |000018b0| 62 6c 65 20 63 6c 69 63 | 6b 20 20 73 70 65 65 64 |ble clic|k speed| |000018c0| 20 20 69 73 20 20 72 65 | 74 75 72 6e 65 64 20 20 | is re|turned | |000018d0| 69 6e 0a 65 76 5f 64 73 | 70 65 65 64 2e 20 20 20 |in.ev_ds|peed. | |000018e0| 49 66 20 65 76 5f 64 66 | 75 6e 63 20 69 73 20 6e |If ev_df|unc is n| |000018f0| 6f 6e 2d 7a 65 72 6f 2c | 20 74 68 65 6e 20 65 76 |on-zero,| then ev| |00001900| 5f 64 6e 65 77 20 62 65 | 63 6f 6d 65 73 20 74 68 |_dnew be|comes th| |00001910| 65 20 6e 65 77 0a 64 6f | 75 62 6c 65 2d 63 6c 69 |e new.do|uble-cli| |00001920| 63 6b 20 20 20 73 70 65 | 65 64 2e 20 20 20 20 42 |ck spe|ed. B| |00001930| 6f 74 68 20 20 65 76 5f | 64 73 70 65 65 64 20 20 |oth ev_|dspeed | |00001940| 61 6e 64 20 20 65 76 5f | 64 6e 65 77 20 20 61 72 |and ev_|dnew ar| |00001950| 65 20 20 77 6f 72 64 73 | 0a 63 6f 6e 74 61 69 6e |e words|.contain| |00001960| 69 6e 67 20 20 61 20 22 | 6d 61 67 69 63 20 6e 75 |ing a "|magic nu| |00001970| 6d 62 65 72 22 20 62 65 | 74 77 65 65 6e 20 7a 65 |mber" be|tween ze| |00001980| 72 6f 20 61 6e 64 20 66 | 6f 75 72 2e 20 20 20 5a |ro and f|our. Z| |00001990| 65 72 6f 20 69 73 20 20 | 74 68 65 0a 73 6c 6f 77 |ero is |the.slow| |000019a0| 65 73 74 20 20 28 69 2e | 65 2e 2c 20 20 6c 6f 6e |est (i.|e., lon| |000019b0| 67 65 73 74 29 20 20 64 | 6f 75 62 6c 65 2d 63 6c |gest) d|ouble-cl| |000019c0| 69 63 6b 2c 20 20 61 6e | 64 20 66 6f 75 72 20 69 |ick, an|d four i| |000019d0| 73 20 74 68 65 20 66 61 | 73 74 65 73 74 2e 0a 28 |s the fa|stest..(| |000019e0| 54 68 65 73 65 20 20 63 | 6f 72 72 65 73 70 6f 6e |These c|orrespon| |000019f0| 64 20 20 74 6f 20 20 74 | 68 65 20 20 73 6c 6f 77 |d to t|he slow| |00001a00| 2d 66 61 73 74 20 20 72 | 61 6e 67 65 20 20 69 6e |-fast r|ange in| |00001a10| 20 20 74 68 65 20 20 20 | 44 65 73 6b 74 6f 70 27 | the |Desktop'| |00001a20| 73 0a 50 72 65 66 65 72 | 65 6e 63 65 73 20 20 64 |s.Prefer|ences d| |00001a30| 69 61 6c 6f 67 2e 29 20 | 20 49 6e 20 67 65 6e 65 |ialog.) | In gene| |00001a40| 72 61 6c 2c 20 20 79 6f | 75 20 73 68 6f 75 6c 64 |ral, yo|u should| |00001a50| 20 6e 6f 74 20 72 65 73 | 65 74 20 74 68 65 20 63 | not res|et the c| |00001a60| 6c 69 63 6b 0a 73 70 65 | 65 64 20 20 75 6e 6c 65 |lick.spe|ed unle| |00001a70| 73 73 20 20 73 70 65 63 | 69 66 69 63 61 6c 6c 79 |ss spec|ifically| |00001a80| 20 72 65 71 75 65 73 74 | 65 64 2c 20 20 62 65 63 | request|ed, bec| |00001a90| 61 75 73 65 20 73 75 63 | 68 20 61 20 63 68 61 6e |ause suc|h a chan| |00001aa0| 67 65 20 20 63 61 6e 0a | 74 68 72 6f 77 20 6f 66 |ge can.|throw of| |00001ab0| 66 20 74 68 65 20 75 73 | 65 72 27 73 20 74 69 6d |f the us|er's tim| |00001ac0| 69 6e 67 20 61 6e 64 20 | 64 65 73 74 72 6f 79 20 |ing and |destroy | |00001ad0| 74 68 65 20 68 61 6e 64 | 2f 65 79 65 20 20 63 6f |the hand|/eye co| |00001ae0| 6f 72 64 69 6e 61 74 69 | 6f 6e 0a 69 6e 76 6f 6c |ordinati|on.invol| |00001af0| 76 65 64 20 69 6e 20 75 | 73 69 6e 67 20 74 68 65 |ved in u|sing the| |00001b00| 20 6d 6f 75 73 65 2e 0a | 0a 20 20 20 20 20 47 45 | mouse..|. GE| |00001b10| 4d 20 20 77 61 73 20 20 | 6f 72 69 67 69 6e 61 6c |M was |original| |00001b20| 6c 79 20 64 65 73 69 67 | 6e 65 64 20 74 6f 20 77 |ly desig|ned to w| |00001b30| 6f 72 6b 20 77 69 74 68 | 20 20 61 20 20 73 69 6e |ork with| a sin| |00001b40| 67 6c 65 20 20 62 75 74 | 74 6f 6e 0a 69 6e 70 75 |gle but|ton.inpu| |00001b50| 74 20 64 65 76 69 63 65 | 2e 20 20 20 54 68 69 73 |t device|. This| |00001b60| 20 61 6c 6c 6f 77 73 20 | 47 45 4d 20 61 70 70 6c | allows |GEM appl| |00001b70| 69 63 61 74 69 6f 6e 73 | 20 74 6f 20 66 75 6e 63 |ications| to func| |00001b80| 74 69 6f 6e 20 77 65 6c | 6c 20 77 69 74 68 0a 64 |tion wel|l with.d| |00001b90| 65 76 69 63 65 73 20 73 | 75 63 68 20 61 73 20 6c |evices s|uch as l| |00001ba0| 69 67 68 74 20 70 65 6e | 73 20 61 6e 64 20 64 69 |ight pen|s and di| |00001bb0| 67 69 74 69 7a 69 6e 67 | 20 74 61 62 6c 65 74 73 |gitizing| tablets| |00001bc0| 2e 20 20 20 48 6f 77 65 | 76 65 72 2c 20 73 6f 6d |. Howe|ver, som| |00001bd0| 65 0a 66 65 61 74 75 72 | 65 73 20 61 72 65 20 61 |e.featur|es are a| |00001be0| 76 61 69 6c 61 62 6c 65 | 20 66 6f 72 20 64 65 61 |vailable| for dea| |00001bf0| 6c 69 6e 67 20 77 69 74 | 68 20 6d 75 6c 74 69 2d |ling wit|h multi-| |00001c00| 62 75 74 74 6f 6e 20 6d | 69 63 65 20 6c 69 6b 65 |button m|ice like| |00001c10| 20 74 68 65 0a 53 54 27 | 73 2e 0a 0a 20 20 20 20 | the.ST'|s... | |00001c20| 20 54 68 65 20 20 65 76 | 6e 74 5f 6d 75 6c 74 69 | The ev|nt_multi| |00001c30| 20 70 61 72 61 6d 65 74 | 65 72 73 20 62 74 6e 5f | paramet|ers btn_| |00001c40| 6d 61 73 6b 20 61 6e 64 | 20 62 74 6e 5f 73 74 61 |mask and| btn_sta| |00001c50| 74 65 20 20 61 72 65 20 | 20 77 6f 72 64 73 0a 63 |te are | words.c| |00001c60| 6f 6e 74 61 69 6e 69 6e | 67 20 20 66 6c 61 67 20 |ontainin|g flag | |00001c70| 62 69 74 73 20 63 6f 72 | 72 65 73 70 6f 6e 64 69 |bits cor|respondi| |00001c80| 6e 67 20 74 6f 20 62 75 | 74 74 6f 6e 73 2e 20 20 |ng to bu|ttons. | |00001c90| 20 54 68 65 20 6c 6f 77 | 65 73 74 20 6f 72 64 65 | The low|est orde| |00001ca0| 72 0a 62 69 74 20 63 6f | 72 72 65 73 70 6f 6e 64 |r.bit co|rrespond| |00001cb0| 73 20 74 6f 20 74 68 65 | 20 6c 65 66 74 2d 6d 6f |s to the| left-mo| |00001cc0| 73 74 20 62 75 74 74 6f | 6e 2c 20 20 61 6e 64 20 |st butto|n, and | |00001cd0| 73 6f 20 6f 6e 2e 20 20 | 41 20 62 69 74 20 69 73 |so on. |A bit is| |00001ce0| 20 73 65 74 0a 69 6e 20 | 20 74 68 65 20 20 62 74 | set.in | the bt| |00001cf0| 6e 5f 6d 61 73 6b 20 70 | 61 72 61 6d 65 74 65 72 |n_mask p|arameter| |00001d00| 20 69 66 20 74 68 65 20 | 41 45 53 20 69 73 20 74 | if the |AES is t| |00001d10| 6f 20 20 77 61 74 63 68 | 20 20 61 20 20 70 61 72 |o watch| a par| |00001d20| 74 69 63 75 6c 61 72 0a | 62 75 74 74 6f 6e 2e 20 |ticular.|button. | |00001d30| 20 20 54 68 65 20 20 63 | 6f 72 72 65 73 70 6f 6e | The c|orrespon| |00001d40| 64 69 6e 67 20 62 69 74 | 20 69 6e 20 62 74 6e 5f |ding bit| in btn_| |00001d50| 73 74 61 74 65 20 69 73 | 20 73 65 74 20 74 6f 20 |state is| set to | |00001d60| 74 68 65 20 20 76 61 6c | 75 65 0a 66 6f 72 20 20 |the val|ue.for | |00001d70| 77 68 69 63 68 20 20 74 | 68 65 20 70 72 6f 67 72 |which t|he progr| |00001d80| 61 6d 20 69 73 20 77 61 | 69 74 69 6e 67 2e 20 20 |am is wa|iting. | |00001d90| 20 54 68 65 20 77 6f 72 | 64 20 72 65 74 75 72 6e | The wor|d return| |00001da0| 65 64 20 20 76 69 61 20 | 20 26 62 74 6e 0a 75 73 |ed via | &btn.us| |00001db0| 65 73 20 20 74 68 65 20 | 20 73 61 6d 65 20 20 62 |es the | same b| |00001dc0| 69 74 20 73 79 73 74 65 | 6d 20 74 6f 20 73 68 6f |it syste|m to sho| |00001dd0| 77 20 74 68 65 20 73 74 | 61 74 65 20 6f 66 20 20 |w the st|ate of | |00001de0| 74 68 65 20 20 62 75 74 | 74 6f 6e 73 20 20 61 74 |the but|tons at| |00001df0| 0a 63 6f 6d 70 6c 65 74 | 69 6f 6e 2e 20 20 20 49 |.complet|ion. I| |00001e00| 74 20 20 69 73 20 20 69 | 6d 70 6f 72 74 61 6e 74 |t is i|mportant| |00001e10| 20 74 6f 20 6e 6f 74 69 | 63 65 20 74 68 61 74 20 | to noti|ce that | |00001e20| 61 6c 6c 20 6f 66 20 20 | 74 68 65 20 20 74 61 72 |all of |the tar| |00001e30| 67 65 74 0a 73 74 61 74 | 65 73 20 69 6e 20 62 74 |get.stat|es in bt| |00001e40| 6e 5f 73 74 61 74 65 20 | 6d 75 73 74 20 6f 63 63 |n_state |must occ| |00001e50| 75 72 20 53 49 4d 55 4c | 54 41 4e 45 4f 55 53 4c |ur SIMUL|TANEOUSL| |00001e60| 59 20 66 6f 72 20 74 68 | 65 20 65 76 65 6e 74 20 |Y for th|e event | |00001e70| 74 6f 20 20 62 65 0a 74 | 72 69 67 67 65 72 65 64 |to be.t|riggered| |00001e80| 2e 0a 0a 20 20 20 20 20 | 4e 6f 74 65 20 74 68 65 |... |Note the| |00001e90| 20 6c 69 6d 69 74 69 6e | 67 20 6e 61 74 75 72 65 | limitin|g nature| |00001ea0| 20 6f 66 20 74 68 69 73 | 20 6c 61 73 74 20 73 74 | of this| last st| |00001eb0| 61 74 65 6d 65 6e 74 2e | 20 20 49 74 20 70 72 65 |atement.| It pre| |00001ec0| 76 65 6e 74 73 0a 61 20 | 20 70 72 6f 67 72 61 6d |vents.a | program| |00001ed0| 20 66 72 6f 6d 20 77 61 | 69 74 69 6e 67 20 66 6f | from wa|iting fo| |00001ee0| 72 20 45 49 54 48 45 52 | 20 74 68 65 20 6c 65 66 |r EITHER| the lef| |00001ef0| 74 20 6f 72 20 72 69 67 | 68 74 20 62 75 74 74 6f |t or rig|ht butto| |00001f00| 6e 20 74 6f 20 20 62 65 | 0a 70 72 65 73 73 65 64 |n to be|.pressed| |00001f10| 2e 20 20 49 6e 73 74 65 | 61 64 2c 20 69 74 20 6d |. Inste|ad, it m| |00001f20| 75 73 74 20 77 61 69 74 | 20 66 6f 72 20 42 4f 54 |ust wait| for BOT| |00001f30| 48 20 74 6f 20 62 65 20 | 70 72 65 73 73 65 64 2c |H to be |pressed,| |00001f40| 20 77 68 69 63 68 20 69 | 73 20 61 0a 64 69 66 66 | which i|s a.diff| |00001f50| 69 63 75 6c 74 20 20 6f | 70 65 72 61 74 69 6f 6e |icult o|peration| |00001f60| 20 20 61 74 20 62 65 73 | 74 2e 20 20 20 41 73 20 | at bes|t. As | |00001f70| 61 20 72 65 73 75 6c 74 | 2c 20 20 74 68 65 20 73 |a result|, the s| |00001f80| 74 61 6e 64 61 72 64 20 | 20 6d 6f 75 73 65 0a 62 |tandard | mouse.b| |00001f90| 75 74 74 6f 6e 20 20 70 | 72 6f 63 65 64 75 72 65 |utton p|rocedure| |00001fa0| 20 69 73 20 70 72 61 63 | 74 69 63 61 6c 6c 79 20 | is prac|tically | |00001fb0| 75 73 65 6c 65 73 73 20 | 69 66 20 79 6f 75 20 77 |useless |if you w| |00001fc0| 61 6e 74 20 74 6f 20 74 | 61 6b 65 20 20 66 75 6c |ant to t|ake ful| |00001fd0| 6c 0a 61 64 76 61 6e 74 | 61 67 65 20 20 6f 66 20 |l.advant|age of | |00001fe0| 20 62 6f 74 68 20 62 75 | 74 74 6f 6e 73 20 6f 6e | both bu|ttons on| |00001ff0| 20 74 68 65 20 53 54 20 | 6d 6f 75 73 65 2e 20 20 | the ST |mouse. | |00002000| 20 49 6e 20 74 68 69 73 | 20 63 61 73 65 2c 20 20 | In this| case, | |00002010| 79 6f 75 72 0a 70 72 6f | 67 72 61 6d 20 20 6d 75 |your.pro|gram mu| |00002020| 73 74 20 22 70 6f 6c 6c | 22 20 74 68 65 20 6d 6f |st "poll|" the mo| |00002030| 75 73 65 20 73 74 61 74 | 65 20 61 6e 64 20 20 64 |use stat|e and d| |00002040| 65 74 65 72 6d 69 6e 65 | 20 20 64 6f 75 62 6c 65 |etermine| double| |00002050| 2d 63 6c 69 63 6b 73 0a | 69 74 73 65 6c 66 2e 20 |-clicks.|itself. | |00002060| 20 20 28 4d 6f 72 65 20 | 20 6f 6e 20 20 70 6f 6c | (More | on pol| |00002070| 6c 69 6e 67 20 6c 61 74 | 65 72 2e 29 20 20 42 79 |ling lat|er.) By| |00002080| 20 74 68 65 20 77 61 79 | 2c 20 20 6d 61 6e 79 20 | the way|, many | |00002090| 20 64 65 73 69 67 6e 65 | 72 73 0a 28 6d 79 73 65 | designe|rs.(myse| |000020a0| 6c 66 20 20 69 6e 63 6c | 75 64 65 64 29 20 62 65 |lf incl|uded) be| |000020b0| 6c 69 65 76 65 20 74 68 | 61 74 20 75 73 69 6e 67 |lieve th|at using| |000020c0| 20 62 6f 74 68 20 62 75 | 74 74 6f 6e 73 20 20 69 | both bu|ttons i| |000020d0| 73 20 20 69 6e 68 65 72 | 65 6e 74 6c 79 0a 63 6f |s inher|ently.co| |000020e0| 6e 66 75 73 69 6e 67 20 | 61 6e 64 20 73 68 6f 75 |nfusing |and shou| |000020f0| 6c 64 20 62 65 20 61 76 | 6f 69 64 65 64 20 61 6e |ld be av|oided an| |00002100| 79 77 61 79 2e 0a 0a 20 | 20 20 20 20 4d 4f 55 53 |yway... | MOUS| |00002110| 45 20 52 45 43 54 41 4e | 47 4c 45 53 2e 20 20 4f |E RECTAN|GLES. O| |00002120| 6e 65 20 6f 66 20 47 45 | 4d 27 73 20 6e 69 63 65 |ne of GE|M's nice| |00002130| 72 20 66 65 61 74 75 72 | 65 73 20 69 73 20 69 74 |r featur|es is it| |00002140| 73 20 61 62 69 6c 69 74 | 79 0a 74 6f 20 77 61 74 |s abilit|y.to wat| |00002150| 63 68 20 74 68 65 20 6d | 6f 75 73 65 20 70 6f 69 |ch the m|ouse poi| |00002160| 6e 74 65 72 27 73 20 70 | 6f 73 69 74 69 6f 6e 20 |nter's p|osition | |00002170| 66 6f 72 20 79 6f 75 2c | 20 61 6e 64 20 72 65 70 |for you,| and rep| |00002180| 6f 72 74 20 61 6e 20 65 | 76 65 6e 74 0a 6f 6e 6c |ort an e|vent.onl| |00002190| 79 20 20 77 68 65 6e 20 | 69 74 20 65 6e 74 65 72 |y when |it enter| |000021a0| 73 20 6f 72 20 64 65 70 | 61 72 74 73 20 61 20 67 |s or dep|arts a g| |000021b0| 69 76 65 6e 20 73 63 72 | 65 65 6e 20 72 65 67 69 |iven scr|een regi| |000021c0| 6f 6e 2e 20 20 20 53 69 | 6e 63 65 20 79 6f 75 0a |on. Si|nce you.| |000021d0| 64 6f 6e 27 74 20 20 68 | 61 76 65 20 74 6f 20 74 |don't h|ave to t| |000021e0| 72 61 63 6b 20 74 68 65 | 20 6d 6f 75 73 65 20 70 |rack the| mouse p| |000021f0| 69 78 65 6c 20 62 79 20 | 70 69 78 65 6c 2c 20 20 |ixel by |pixel, | |00002200| 74 68 69 73 20 65 6c 69 | 6d 69 6e 61 74 65 73 20 |this eli|minates | |00002210| 20 61 0a 6c 6f 74 20 20 | 6f 66 20 61 70 70 6c 69 | a.lot |of appli| |00002220| 63 61 74 69 6f 6e 20 6f | 76 65 72 68 65 61 64 2e |cation o|verhead.| |00002230| 20 20 20 54 68 65 20 65 | 76 6e 74 5f 6d 75 6c 74 | The e|vnt_mult| |00002240| 69 20 63 61 6c 6c 20 67 | 69 76 65 73 20 79 6f 75 |i call g|ives you| |00002250| 20 20 74 68 65 0a 61 62 | 69 6c 69 74 79 20 20 74 | the.ab|ility t| |00002260| 6f 20 20 73 70 65 63 69 | 66 79 20 6f 6e 65 20 6f |o speci|fy one o| |00002270| 72 20 74 77 6f 20 72 65 | 63 74 61 6e 67 75 6c 61 |r two re|ctangula| |00002280| 72 20 61 72 65 61 73 20 | 20 77 68 69 63 68 20 20 |r areas | which | |00002290| 77 69 6c 6c 20 20 62 65 | 0a 77 61 74 63 68 65 64 |will be|.watched| |000022a0| 2e 20 20 20 41 6e 20 65 | 76 65 6e 74 20 63 61 6e |. An e|vent can| |000022b0| 20 62 65 20 67 65 6e 65 | 72 61 74 65 64 20 65 69 | be gene|rated ei| |000022c0| 74 68 65 72 20 77 68 65 | 6e 20 74 68 65 20 6d 6f |ther whe|n the mo| |000022d0| 75 73 65 20 70 6f 69 6e | 74 65 72 0a 65 6e 74 65 |use poin|ter.ente| |000022e0| 72 73 20 74 68 65 20 72 | 65 63 74 61 6e 67 6c 65 |rs the r|ectangle| |000022f0| 2c 20 20 6f 72 20 77 68 | 65 6e 20 69 74 20 6c 65 |, or wh|en it le| |00002300| 61 76 65 73 20 74 68 65 | 20 72 65 63 74 61 6e 67 |aves the| rectang| |00002310| 6c 65 2e 20 20 54 68 65 | 20 22 72 31 5f 22 0a 73 |le. The| "r1_".s| |00002320| 65 72 69 65 73 20 20 6f | 66 20 20 70 61 72 61 6d |eries o|f param| |00002330| 65 74 65 72 73 20 73 70 | 65 63 69 66 69 65 73 20 |eters sp|ecifies | |00002340| 6f 6e 65 20 6f 66 20 74 | 68 65 20 20 72 65 63 74 |one of t|he rect| |00002350| 61 6e 67 6c 65 73 2c 20 | 20 61 6e 64 20 20 74 68 |angles, | and th| |00002360| 65 0a 22 72 32 5f 22 20 | 73 65 72 69 65 73 20 73 |e."r2_" |series s| |00002370| 70 65 63 69 66 69 65 73 | 20 74 68 65 20 6f 74 68 |pecifies| the oth| |00002380| 65 72 2c 20 61 73 20 66 | 6f 6c 6c 6f 77 73 3a 0a |er, as f|ollows:.| |00002390| 0a 20 20 20 20 20 72 31 | 5f 66 6c 61 67 2c 20 72 |. r1|_flag, r| |000023a0| 32 5f 66 6c 61 67 20 2d | 20 7a 65 72 6f 20 69 66 |2_flag -| zero if| |000023b0| 20 77 61 69 74 69 6e 67 | 20 74 6f 20 65 6e 74 65 | waiting| to ente| |000023c0| 72 20 72 65 63 74 61 6e | 67 6c 65 2c 0a 20 20 20 |r rectan|gle,. | |000023d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000023e0| 20 20 20 20 20 20 6f 6e | 65 20 69 66 20 77 61 69 | on|e if wai| |000023f0| 74 69 6e 67 20 74 6f 20 | 6c 65 61 76 65 20 72 65 |ting to |leave re| |00002400| 63 74 61 6e 67 6c 65 0a | 20 20 20 20 20 72 31 5f |ctangle.| r1_| |00002410| 78 2c 20 72 32 5f 78 20 | 2d 20 75 70 70 65 72 20 |x, r2_x |- upper | |00002420| 6c 65 66 74 20 58 20 72 | 61 73 74 65 72 20 63 6f |left X r|aster co| |00002430| 6f 72 64 69 6e 61 74 65 | 20 6f 66 20 77 61 69 74 |ordinate| of wait| |00002440| 20 72 65 63 74 61 6e 67 | 6c 65 0a 20 20 20 20 20 | rectang|le. | |00002450| 72 31 5f 79 2c 20 72 32 | 5f 79 20 2d 20 75 70 70 |r1_y, r2|_y - upp| |00002460| 65 72 20 6c 65 66 74 20 | 59 20 72 61 73 74 65 72 |er left |Y raster| |00002470| 20 63 6f 6f 72 64 69 6e | 61 74 65 20 6f 66 20 77 | coordin|ate of w| |00002480| 61 69 74 20 72 65 63 74 | 61 6e 67 6c 65 0a 20 20 |ait rect|angle. | |00002490| 20 20 20 72 31 5f 77 2c | 20 72 32 5f 77 20 2d 20 | r1_w,| r2_w - | |000024a0| 77 69 64 74 68 20 6f 66 | 20 77 61 69 74 20 72 65 |width of| wait re| |000024b0| 63 74 61 6e 67 6c 65 20 | 69 6e 20 70 69 78 65 6c |ctangle |in pixel| |000024c0| 73 0a 20 20 20 20 20 72 | 31 5f 68 2c 20 72 32 5f |s. r|1_h, r2_| |000024d0| 68 20 2d 20 68 65 69 67 | 68 74 20 6f 66 20 77 61 |h - heig|ht of wa| |000024e0| 69 74 20 72 65 63 74 61 | 6e 67 6c 65 20 69 6e 20 |it recta|ngle in | |000024f0| 70 69 78 65 6c 73 0a 0a | 45 61 63 68 20 20 72 65 |pixels..|Each re| |00002500| 63 74 61 6e 67 6c 65 20 | 20 77 61 69 74 20 77 69 |ctangle | wait wi| |00002510| 6c 6c 20 6f 6e 6c 79 20 | 62 65 20 61 63 74 69 76 |ll only |be activ| |00002520| 65 20 69 66 20 69 74 73 | 20 20 61 73 73 6f 63 69 |e if its| associ| |00002530| 61 74 65 64 20 20 66 6c | 61 67 0a 28 4d 55 5f 4d |ated fl|ag.(MU_M| |00002540| 31 20 6f 72 20 4d 55 5f | 4d 32 29 20 77 61 73 20 |1 or MU_|M2) was | |00002550| 73 65 74 20 69 6e 20 65 | 76 5f 66 6c 61 67 73 2e |set in e|v_flags.| |00002560| 0a 0a 20 20 20 20 20 54 | 68 65 72 65 20 20 61 72 |.. T|here ar| |00002570| 65 20 74 77 6f 20 63 6f | 6d 6d 6f 6e 20 75 73 65 |e two co|mmon use| |00002580| 73 20 6f 66 20 72 65 63 | 74 61 6e 67 6c 65 20 77 |s of rec|tangle w| |00002590| 61 69 74 73 2e 20 20 20 | 54 68 65 20 66 69 72 73 |aits. |The firs| |000025a0| 74 20 69 73 0a 75 73 65 | 64 20 77 68 65 6e 20 63 |t is.use|d when c| |000025b0| 72 65 61 74 69 6e 67 20 | 6d 6f 75 73 65 2d 73 65 |reating |mouse-se| |000025c0| 6e 73 69 74 69 76 65 20 | 72 65 67 69 6f 6e 73 20 |nsitive |regions | |000025d0| 6f 6e 20 74 68 65 20 73 | 63 72 65 65 6e 2e 20 20 |on the s|creen. | |000025e0| 20 4d 6f 75 73 65 2d 0a | 73 65 6e 73 69 74 69 76 | Mouse-.|sensitiv| |000025f0| 65 20 72 65 67 69 6f 6e | 73 2c 20 61 6c 73 6f 20 |e region|s, also | |00002600| 63 61 6c 6c 65 64 20 22 | 68 6f 74 20 73 70 6f 74 |called "|hot spot| |00002610| 73 22 2c 20 61 72 65 20 | 6f 62 6a 65 63 74 73 20 |s", are |objects | |00002620| 77 68 69 63 68 20 73 68 | 6f 77 0a 61 20 20 76 69 |which sh|ow.a vi| |00002630| 73 75 61 6c 20 65 66 66 | 65 63 74 2c 20 20 73 75 |sual eff|ect, su| |00002640| 63 68 20 61 73 20 69 6e | 76 65 72 73 69 6f 6e 20 |ch as in|version | |00002650| 6f 72 20 6f 75 74 6c 69 | 6e 69 6e 67 2c 20 20 77 |or outli|ning, w| |00002660| 68 65 6e 20 74 68 65 20 | 6d 6f 75 73 65 0a 63 75 |hen the |mouse.cu| |00002670| 72 73 6f 72 20 20 6d 6f | 76 65 73 20 20 6f 76 65 |rsor mo|ves ove| |00002680| 72 20 74 68 65 6d 2e 20 | 20 20 54 68 65 20 69 74 |r them. | The it| |00002690| 65 6d 73 20 69 6e 20 61 | 20 6d 65 6e 75 20 64 72 |ems in a| menu dr| |000026a0| 6f 70 64 6f 77 6e 2c 20 | 20 6f 72 20 20 74 68 65 |opdown, | or the| |000026b0| 0a 69 6e 76 65 72 73 69 | 6f 6e 20 20 6f 66 20 20 |.inversi|on of | |000026c0| 44 65 73 6b 74 6f 70 20 | 69 63 6f 6e 73 20 64 75 |Desktop |icons du| |000026d0| 72 69 6e 67 20 61 20 64 | 72 61 67 20 6f 70 65 72 |ring a d|rag oper| |000026e0| 61 74 69 6f 6e 2c 20 20 | 61 72 65 20 20 63 6f 6d |ation, |are com| |000026f0| 6d 6f 6e 0a 65 78 61 6d | 70 6c 65 73 2e 0a 0a 20 |mon.exam|ples... | |00002700| 20 20 20 20 20 20 20 48 | 6f 74 20 73 70 6f 74 73 | H|ot spots| |00002710| 20 61 72 65 20 63 6f 6d | 6d 6f 6e 6c 79 20 63 72 | are com|monly cr| |00002720| 65 61 74 65 64 20 62 79 | 20 67 72 6f 75 70 69 6e |eated by| groupin| |00002730| 67 20 20 74 68 65 20 20 | 73 65 6e 73 69 74 69 76 |g the |sensitiv| |00002740| 65 0a 6f 62 6a 65 63 74 | 73 20 20 69 6e 74 6f 20 |e.object|s into | |00002750| 20 6f 6e 65 20 20 6f 72 | 20 20 74 77 6f 20 61 72 | one or| two ar| |00002760| 65 61 73 2c 20 20 61 6e | 64 20 74 68 65 6e 20 73 |eas, an|d then s| |00002770| 65 74 74 69 6e 67 20 20 | 75 70 20 20 61 20 20 6d |etting |up a m| |00002780| 6f 75 73 65 0a 72 65 63 | 74 61 6e 67 6c 65 20 20 |ouse.rec|tangle | |00002790| 77 61 69 74 20 20 66 6f | 72 20 20 65 6e 74 65 72 |wait fo|r enter| |000027a0| 69 6e 67 20 20 74 68 65 | 20 20 61 72 65 61 2e 20 |ing the| area. | |000027b0| 20 20 20 57 68 65 6e 20 | 20 74 68 65 20 20 65 76 | When | the ev| |000027c0| 65 6e 74 20 20 69 73 0a | 67 65 6e 65 72 61 74 65 |ent is.|generate| |000027d0| 64 2c 20 20 74 68 65 20 | 20 26 6d 78 20 20 61 6e |d, the | &mx an| |000027e0| 64 20 26 6d 79 20 72 65 | 74 75 72 6e 73 20 6d 61 |d &my re|turns ma| |000027f0| 79 20 62 65 20 65 78 61 | 6d 69 6e 65 64 20 74 6f |y be exa|mined to| |00002800| 20 66 69 6e 64 20 20 74 | 68 65 0a 74 72 75 65 20 | find t|he.true | |00002810| 20 6d 6f 75 73 65 20 63 | 6f 6f 72 64 69 6e 61 74 | mouse c|oordinat| |00002820| 65 73 2c 20 20 61 6e 64 | 20 6f 62 6a 63 5f 66 69 |es, and| objc_fi| |00002830| 6e 64 20 6f 72 20 73 6f | 6d 65 20 6f 74 68 65 72 |nd or so|me other| |00002840| 20 73 65 61 72 63 68 20 | 20 77 69 6c 6c 0a 64 65 | search | will.de| |00002850| 74 65 72 6d 69 6e 65 20 | 20 74 68 65 20 61 66 66 |termine | the aff| |00002860| 65 63 74 65 64 20 6f 62 | 6a 65 63 74 2e 20 20 20 |ected ob|ject. | |00002870| 54 68 65 20 6f 62 6a 65 | 63 74 20 69 73 20 74 68 |The obje|ct is th| |00002880| 65 6e 20 20 68 69 67 68 | 6c 69 67 68 74 65 64 2c |en high|lighted,| |00002890| 0a 61 6e 64 20 20 61 20 | 6e 65 77 20 77 61 69 74 |.and a |new wait| |000028a0| 20 66 6f 72 20 65 78 69 | 74 69 6e 67 20 74 68 65 | for exi|ting the| |000028b0| 20 6f 62 6a 65 63 74 20 | 72 65 63 74 61 6e 67 6c | object |rectangl| |000028c0| 65 20 69 73 20 20 70 6f | 73 74 65 64 2e 20 20 20 |e is po|sted. | |000028d0| 28 53 54 0a 50 52 4f 20 | 20 47 45 4d 20 20 23 31 |(ST.PRO | GEM #1| |000028e0| 33 20 77 69 6c 6c 20 73 | 68 6f 77 20 68 6f 77 20 |3 will s|how how | |000028f0| 74 6f 20 63 72 65 61 74 | 65 20 6d 6f 72 65 20 20 |to creat|e more | |00002900| 63 6f 6d 70 6c 65 78 20 | 20 65 66 66 65 63 74 73 |complex | effects| |00002910| 20 20 77 69 74 68 0a 72 | 65 63 74 61 6e 67 6c 65 | with.r|ectangle| |00002920| 20 77 61 69 74 73 2e 29 | 0a 0a 20 20 20 20 20 54 | waits.)|.. T| |00002930| 68 65 20 20 73 65 63 6f | 6e 64 20 63 6f 6d 6d 6f |he seco|nd commo| |00002940| 6e 20 75 73 65 20 6f 66 | 20 72 65 63 74 61 6e 67 |n use of| rectang| |00002950| 6c 65 20 77 61 69 74 73 | 20 69 73 20 69 6e 20 20 |le waits| is in | |00002960| 61 6e 69 6d 61 74 69 6e | 67 20 20 61 0a 64 72 61 |animatin|g a.dra| |00002970| 67 20 6f 70 65 72 61 74 | 69 6f 6e 2e 20 20 49 6e |g operat|ion. In| |00002980| 20 6d 61 6e 79 20 63 61 | 73 65 73 2c 20 79 6f 75 | many ca|ses, you| |00002990| 20 63 61 6e 20 75 73 65 | 20 73 74 61 6e 64 61 72 | can use| standar| |000029a0| 64 20 41 45 53 20 61 6e | 69 6d 61 74 69 6f 6e 0a |d AES an|imation.| |000029b0| 72 6f 75 74 69 6e 65 73 | 20 73 75 63 68 20 61 73 |routines| such as| |000029c0| 20 67 72 61 66 5f 64 72 | 61 67 62 6f 78 20 6f 72 | graf_dr|agbox or| |000029d0| 20 67 72 61 66 5f 72 75 | 62 62 65 72 62 6f 78 2e | graf_ru|bberbox.| |000029e0| 20 20 20 49 6e 20 6f 74 | 68 65 72 20 63 61 73 65 | In ot|her case| |000029f0| 73 2c 0a 79 6f 75 20 20 | 6d 61 79 20 20 77 61 6e |s,.you |may wan| |00002a00| 74 20 20 61 20 66 69 67 | 75 72 65 20 6f 74 68 65 |t a fig|ure othe| |00002a10| 72 20 74 68 61 6e 20 61 | 20 73 69 6d 70 6c 65 20 |r than a| simple | |00002a20| 20 62 6f 78 2c 20 20 6f | 72 20 20 64 65 73 69 72 | box, o|r desir| |00002a30| 65 20 20 74 6f 0a 63 6f | 6d 62 69 6e 65 20 20 20 |e to.co|mbine | |00002a40| 77 61 69 74 73 20 20 66 | 6f 72 20 20 6f 74 68 65 |waits f|or othe| |00002a50| 72 20 20 63 6f 6e 64 69 | 74 69 6f 6e 73 20 20 73 |r condi|tions s| |00002a60| 75 63 68 20 20 61 73 20 | 20 6b 65 79 73 74 72 6f |uch as | keystro| |00002a70| 6b 65 73 20 20 20 6f 72 | 0a 63 6f 6c 6c 69 73 69 |kes or|.collisi| |00002a80| 6f 6e 20 77 69 74 68 20 | 68 6f 74 73 70 6f 74 73 |on with |hotspots| |00002a90| 2e 20 20 54 68 65 6e 20 | 79 6f 75 20 77 69 6c 6c |. Then |you will| |00002aa0| 20 6e 65 65 64 20 74 6f | 20 69 6d 70 6c 65 6d 65 | need to| impleme| |00002ab0| 6e 74 20 74 68 65 20 64 | 72 61 67 0a 6f 70 65 72 |nt the d|rag.oper| |00002ac0| 61 74 69 6f 6e 20 20 79 | 6f 75 72 73 65 6c 66 2c |ation y|ourself,| |00002ad0| 20 20 75 73 69 6e 67 20 | 20 74 68 65 20 20 6d 6f | using | the mo| |00002ae0| 75 73 65 20 72 65 63 74 | 61 6e 67 6c 65 73 20 20 |use rect|angles | |00002af0| 74 6f 20 20 74 72 61 63 | 6b 20 20 74 68 65 0a 63 |to trac|k the.c| |00002b00| 75 72 73 6f 72 2e 0a 0a | 20 20 20 20 20 49 66 20 |ursor...| If | |00002b10| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 74 72 61 63 |you want| to trac| |00002b20| 6b 20 74 68 65 20 63 75 | 72 73 6f 72 20 63 6c 6f |k the cu|rsor clo| |00002b30| 73 65 6c 79 2c 20 73 69 | 6d 70 6c 79 20 77 61 69 |sely, si|mply wai| |00002b40| 74 20 66 6f 72 20 65 78 | 69 74 0a 6f 6e 20 61 20 |t for ex|it.on a | |00002b50| 6f 6e 65 20 70 69 78 65 | 6c 20 72 65 63 74 61 6e |one pixe|l rectan| |00002b60| 67 6c 65 20 61 74 20 74 | 68 65 20 63 75 72 72 65 |gle at t|he curre| |00002b70| 6e 74 20 70 6f 73 69 74 | 69 6f 6e 2c 20 20 61 6e |nt posit|ion, an| |00002b80| 64 20 70 65 72 66 6f 72 | 6d 20 74 68 65 0a 61 6e |d perfor|m the.an| |00002b90| 69 6d 61 74 69 6f 6e 20 | 72 6f 75 74 69 6e 65 20 |imation |routine | |00002ba0| 61 74 20 65 61 63 68 20 | 65 76 65 6e 74 2e 20 20 |at each |event. | |00002bb0| 49 66 20 74 68 65 20 64 | 72 61 67 20 6f 70 65 72 |If the d|rag oper| |00002bc0| 61 74 69 6f 6e 20 6f 6e | 6c 79 20 77 6f 72 6b 73 |ation on|ly works| |00002bd0| 0a 6f 6e 20 61 20 67 72 | 69 64 2c 20 20 73 75 63 |.on a gr|id, suc| |00002be0| 68 20 61 73 20 63 68 61 | 72 61 63 74 65 72 20 70 |h as cha|racter p| |00002bf0| 6f 73 69 74 69 6f 6e 73 | 2c 20 20 79 6f 75 20 63 |ositions|, you c| |00002c00| 61 6e 20 73 70 65 63 69 | 66 79 20 61 20 6c 61 72 |an speci|fy a lar| |00002c10| 67 65 72 0a 77 61 69 74 | 20 20 72 65 63 74 61 6e |ger.wait| rectan| |00002c20| 67 6c 65 20 61 6e 64 20 | 6f 6e 6c 79 20 75 70 64 |gle and |only upd| |00002c30| 61 74 65 20 74 68 65 20 | 64 69 73 70 6c 61 79 20 |ate the |display | |00002c40| 77 68 65 6e 20 61 20 6c | 65 67 61 6c 20 20 62 6f |when a l|egal bo| |00002c50| 75 6e 64 61 72 79 0a 69 | 73 20 63 72 6f 73 73 65 |undary.i|s crosse| |00002c60| 64 2e 0a 0a 20 20 20 20 | 20 4d 45 53 53 41 47 45 |d... | MESSAGE| |00002c70| 53 2e 20 20 20 54 68 65 | 20 20 26 6d 73 67 5f 62 |S. The| &msg_b| |00002c80| 75 66 66 20 70 61 72 61 | 6d 65 74 65 72 20 6f 66 |uff para|meter of| |00002c90| 20 65 76 6e 74 5f 6d 75 | 6c 74 69 20 67 69 76 65 | evnt_mu|lti give| |00002ca0| 73 20 20 74 68 65 0a 61 | 64 64 72 65 73 73 20 20 |s the.a|ddress | |00002cb0| 6f 66 20 61 20 31 36 20 | 62 79 74 65 20 62 75 66 |of a 16 |byte buf| |00002cc0| 66 65 72 20 74 6f 20 72 | 65 63 65 69 76 65 20 61 |fer to r|eceive a| |00002cd0| 6e 20 41 45 53 20 6d 65 | 73 73 61 67 65 2e 20 20 |n AES me|ssage. | |00002ce0| 20 41 73 20 6e 6f 74 65 | 64 0a 61 62 6f 76 65 2c | As note|d.above,| |00002cf0| 20 20 49 20 68 61 76 65 | 20 64 69 73 63 75 73 73 | I have| discuss| |00002d00| 65 64 20 73 74 61 6e 64 | 61 72 64 20 41 45 53 20 |ed stand|ard AES | |00002d10| 6d 65 73 73 61 67 65 73 | 20 65 6c 73 65 77 68 65 |messages| elsewhe| |00002d20| 72 65 2e 20 54 68 65 20 | 6c 61 73 74 0a 63 6f 6c |re. The |last.col| |00002d30| 75 6d 6e 20 20 61 6c 73 | 6f 20 6d 65 6e 74 69 6f |umn als|o mentio| |00002d40| 6e 65 64 20 74 68 61 74 | 20 6d 65 73 73 61 67 65 |ned that| message| |00002d50| 73 20 6d 61 79 20 62 65 | 20 75 73 65 64 20 74 6f |s may be| used to| |00002d60| 20 20 73 69 6d 75 6c 61 | 74 65 20 20 63 6f 2d 0a | simula|te co-.| |00002d70| 72 6f 75 74 69 6e 65 73 | 20 20 77 69 74 68 69 6e |routines| within| |00002d80| 20 20 61 20 73 69 6e 67 | 6c 65 20 47 45 4d 20 70 | a sing|le GEM p| |00002d90| 72 6f 67 72 61 6d 2e 0a | 0a 20 20 20 20 20 41 20 |rogram..|. A | |00002da0| 20 66 75 72 74 68 65 72 | 20 70 6f 73 73 69 62 69 | further| possibi| |00002db0| 6c 69 74 79 20 77 68 69 | 63 68 20 62 65 61 72 73 |lity whi|ch bears| |00002dc0| 20 65 78 61 6d 69 6e 61 | 74 69 6f 6e 20 69 73 20 | examina|tion is | |00002dd0| 74 68 65 20 75 73 65 20 | 20 6f 66 0a 6d 65 73 73 |the use | of.mess| |00002de0| 61 67 65 73 20 20 74 6f | 20 63 6f 6f 72 64 69 6e |ages to| coordin| |00002df0| 61 74 65 20 74 68 65 20 | 61 63 74 69 76 69 74 69 |ate the |activiti| |00002e00| 65 73 20 6f 66 20 6d 75 | 6c 74 69 70 6c 65 20 20 |es of mu|ltiple | |00002e10| 70 72 6f 67 72 61 6d 73 | 2e 20 20 20 49 6e 0a 73 |programs|. In.s| |00002e20| 69 6e 67 6c 65 2d 74 61 | 73 6b 69 6e 67 20 20 47 |ingle-ta|sking G| |00002e30| 45 4d 2c 20 20 61 74 20 | 6c 65 61 73 74 20 6f 6e |EM, at |least on| |00002e40| 65 20 6f 66 20 74 68 65 | 73 65 20 70 72 6f 67 72 |e of the|se progr| |00002e50| 61 6d 73 20 77 6f 75 6c | 64 20 68 61 76 65 20 74 |ams woul|d have t| |00002e60| 6f 0a 62 65 20 20 61 20 | 20 64 65 73 6b 20 61 63 |o.be a | desk ac| |00002e70| 63 65 73 73 6f 72 79 2e | 20 20 20 49 6e 20 61 6e |cessory.| In an| |00002e80| 79 20 73 75 63 68 20 75 | 73 65 20 6f 66 20 74 68 |y such u|se of th| |00002e90| 65 20 47 45 4d 20 6d 65 | 73 73 61 67 65 73 2c 20 |e GEM me|ssages, | |00002ea0| 20 79 6f 75 0a 73 68 6f | 75 6c 64 20 70 61 79 20 | you.sho|uld pay | |00002eb0| 63 61 72 65 66 75 6c 20 | 61 74 74 65 6e 74 69 6f |careful |attentio| |00002ec0| 6e 20 74 6f 20 74 68 65 | 20 70 6f 73 73 69 62 69 |n to the| possibi| |00002ed0| 6c 69 74 79 20 6f 66 20 | 6f 76 65 72 6c 6f 61 64 |lity of |overload| |00002ee0| 69 6e 67 20 74 68 65 0a | 71 75 65 75 65 2e 20 20 |ing the.|queue. | |00002ef0| 20 4f 6e 6c 79 20 20 65 | 69 67 68 74 20 20 73 6c | Only e|ight sl| |00002f00| 6f 74 73 20 61 72 65 20 | 70 72 6f 76 69 64 65 64 |ots are |provided| |00002f10| 20 70 65 72 20 74 61 73 | 6b 2c 20 20 61 6e 64 20 | per tas|k, and | |00002f20| 20 6d 65 73 73 61 67 65 | 73 2c 0a 75 6e 6c 69 6b | message|s,.unlik| |00002f30| 65 20 65 76 65 6e 74 73 | 2c 20 63 61 6e 6e 6f 74 |e events|, cannot| |00002f40| 20 62 65 20 6d 65 72 67 | 65 64 20 62 79 20 74 68 | be merg|ed by th| |00002f50| 65 20 41 45 53 2e 0a 0a | 20 20 20 20 20 54 49 4d |e AES...| TIM| |00002f60| 45 52 2e 20 20 20 54 68 | 65 20 20 74 69 6d 65 72 |ER. Th|e timer| |00002f70| 20 65 76 65 6e 74 20 67 | 69 76 65 73 20 79 6f 75 | event g|ives you| |00002f80| 20 61 20 77 61 79 20 6f | 66 20 70 61 63 69 6e 67 | a way o|f pacing| |00002f90| 20 61 63 74 69 6f 6e 20 | 6f 6e 0a 74 68 65 20 20 | action |on.the | |00002fa0| 73 63 72 65 65 6e 2c 20 | 20 63 6c 6f 63 6b 69 6e |screen, | clockin| |00002fb0| 67 20 6f 75 74 20 6d 65 | 73 73 61 67 65 73 2c 20 |g out me|ssages, | |00002fc0| 20 6f 72 20 70 72 6f 76 | 69 64 69 6e 67 20 61 20 | or prov|iding a | |00002fd0| 74 69 6d 65 2d 6f 75 74 | 20 65 78 69 74 0a 66 6f |time-out| exit.fo| |00002fe0| 72 20 20 20 61 6e 20 20 | 6f 70 65 72 61 74 69 6f |r an |operatio| |00002ff0| 6e 2e 20 20 20 20 45 76 | 6e 74 5f 6d 75 6c 74 69 |n. Ev|nt_multi| |00003000| 20 20 68 61 73 20 20 74 | 77 6f 20 20 31 36 2d 62 | has t|wo 16-b| |00003010| 69 74 20 20 74 69 6d 65 | 72 20 20 69 6e 70 75 74 |it time|r input| |00003020| 0a 70 61 72 61 6d 65 74 | 65 72 73 2c 20 20 74 69 |.paramet|ers, ti| |00003030| 6d 65 5f 68 69 20 20 61 | 6e 64 20 20 74 69 6d 65 |me_hi a|nd time| |00003040| 5f 6c 6f 2c 20 20 77 68 | 69 63 68 20 61 72 65 20 |_lo, wh|ich are | |00003050| 74 68 65 20 74 6f 70 20 | 61 6e 64 20 20 62 6f 74 |the top |and bot| |00003060| 74 6f 6d 0a 68 61 6c 76 | 65 73 2c 20 20 72 65 73 |tom.halv|es, res| |00003070| 70 65 63 74 69 76 65 6c | 79 2c 20 20 6f 66 20 20 |pectivel|y, of | |00003080| 61 20 20 33 32 2d 62 69 | 74 20 6d 69 6c 6c 69 73 |a 32-bi|t millis| |00003090| 65 63 6f 6e 64 20 63 6f | 75 6e 74 2e 20 20 20 48 |econd co|unt. H| |000030a0| 6f 77 65 76 65 72 2c 0a | 74 68 69 73 20 64 6f 63 |owever,.|this doc| |000030b0| 75 6d 65 6e 74 65 64 20 | 74 69 6d 65 20 72 65 73 |umented |time res| |000030c0| 6f 6c 75 74 69 6f 6e 20 | 6d 75 73 74 20 62 65 20 |olution |must be | |000030d0| 74 61 6b 65 6e 20 77 69 | 74 68 20 61 20 67 72 61 |taken wi|th a gra| |000030e0| 69 6e 20 6f 66 20 73 61 | 6c 74 0a 6f 6e 20 74 68 |in of sa|lt.on th| |000030f0| 65 20 53 54 2c 20 63 6f | 6e 73 69 64 65 72 69 6e |e ST, co|nsiderin| |00003100| 67 20 74 68 61 74 20 69 | 74 73 20 69 6e 74 65 72 |g that i|ts inter| |00003110| 6e 61 6c 20 63 6c 6f 63 | 6b 20 66 72 65 71 75 65 |nal cloc|k freque| |00003120| 6e 63 79 20 69 73 20 32 | 30 30 48 7a 21 0a 0a 20 |ncy is 2|00Hz!.. | |00003130| 20 20 20 20 54 68 65 20 | 20 74 69 6d 65 72 20 20 | The | timer | |00003140| 65 76 65 6e 74 20 69 73 | 20 61 6c 73 6f 20 65 78 |event is| also ex| |00003150| 74 72 65 6d 65 6c 79 20 | 75 73 65 66 75 6c 20 20 |tremely |useful | |00003160| 66 6f 72 20 20 70 6f 6c | 6c 69 6e 67 20 20 74 68 |for pol|ling th| |00003170| 65 0a 65 76 65 6e 74 20 | 20 71 75 65 75 65 2e 20 |e.event | queue. | |00003180| 20 20 41 20 20 22 70 6f | 6c 6c 22 20 20 74 65 73 | A "po|ll" tes| |00003190| 74 73 20 74 68 65 20 71 | 75 65 75 65 20 20 66 6f |ts the q|ueue fo| |000031a0| 72 20 20 63 6f 6d 70 6c | 65 74 65 64 20 20 65 76 |r compl|eted ev| |000031b0| 65 6e 74 73 0a 77 69 74 | 68 6f 75 74 20 67 6f 69 |ents.wit|hout goi| |000031c0| 6e 67 20 69 6e 74 6f 20 | 61 20 77 61 69 74 20 73 |ng into |a wait s| |000031d0| 74 61 74 65 20 69 66 20 | 6e 6f 6e 65 20 61 72 65 |tate if |none are| |000031e0| 20 70 72 65 73 65 6e 74 | 2e 20 20 49 6e 20 47 45 | present|. In GE| |000031f0| 4d 2c 20 74 68 69 73 0a | 69 73 20 20 20 64 6f 6e |M, this.|is don| |00003200| 65 20 20 62 79 20 20 67 | 65 6e 65 72 61 74 69 6e |e by g|eneratin| |00003210| 67 20 20 61 20 20 6e 75 | 6c 6c 20 20 65 76 65 6e |g a nu|ll even| |00003220| 74 20 20 77 68 69 63 68 | 20 20 20 61 6c 77 61 79 |t which| alway| |00003230| 73 20 20 20 6f 63 63 75 | 72 73 0a 69 6d 6d 65 64 |s occu|rs.immed| |00003240| 69 61 74 65 6c 79 2e 20 | 20 41 20 74 69 6d 65 72 |iately. | A timer| |00003250| 20 63 6f 75 6e 74 20 6f | 66 20 7a 65 72 6f 20 77 | count o|f zero w| |00003260| 69 6c 6c 20 64 6f 20 6a | 75 73 74 20 74 68 61 74 |ill do j|ust that| |00003270| 2e 0a 0a 20 20 20 20 20 | 54 68 65 72 65 66 6f 72 |... |Therefor| |00003280| 65 2c 20 20 79 6f 75 20 | 20 63 61 6e 20 70 6f 6c |e, you | can pol| |00003290| 6c 20 66 6f 72 20 61 6e | 79 20 73 65 74 20 6f 66 |l for an|y set of| |000032a0| 20 65 76 65 6e 74 73 20 | 62 79 20 73 70 65 63 69 | events |by speci| |000032b0| 66 79 69 6e 67 0a 74 68 | 65 6d 20 20 69 6e 20 20 |fying.th|em in | |000032c0| 74 68 65 20 65 76 6e 74 | 5f 6d 75 6c 74 69 20 70 |the evnt|_multi p| |000032d0| 61 72 61 6d 65 74 65 72 | 73 2e 20 20 20 41 20 7a |arameter|s. A z| |000032e0| 65 72 6f 20 74 69 6d 65 | 72 20 77 61 69 74 20 20 |ero time|r wait | |000032f0| 69 73 20 20 74 68 65 6e | 0a 61 64 64 65 64 20 74 |is then|.added t| |00003300| 6f 20 65 6e 73 75 72 65 | 20 69 6d 6d 65 64 69 61 |o ensure| immedia| |00003310| 74 65 20 63 6f 6d 70 6c | 65 74 69 6f 6e 2e 20 20 |te compl|etion. | |00003320| 20 55 70 6f 6e 20 72 65 | 74 75 72 6e 2c 20 20 69 | Upon re|turn, i| |00003330| 66 20 61 6e 79 20 65 76 | 65 6e 74 0a 62 69 74 28 |f any ev|ent.bit(| |00003340| 73 29 20 4f 54 48 45 52 | 20 74 68 61 6e 20 4d 55 |s) OTHER| than MU| |00003350| 5f 54 49 4d 45 52 20 61 | 72 65 20 73 65 74 2c 20 |_TIMER a|re set, | |00003360| 20 61 20 73 69 67 6e 69 | 66 69 63 61 6e 74 20 65 | a signi|ficant e| |00003370| 76 65 6e 74 20 77 61 73 | 20 66 6f 75 6e 64 0a 6f |vent was| found.o| |00003380| 6e 20 74 68 65 20 71 75 | 65 75 65 2e 20 20 49 66 |n the qu|eue. If| |00003390| 20 6f 6e 6c 79 20 4d 55 | 5f 54 49 4d 45 52 20 69 | only MU|_TIMER i| |000033a0| 73 20 73 65 74 2c 20 74 | 68 65 20 70 6f 6c 6c 20 |s set, t|he poll | |000033b0| 66 61 69 6c 65 64 20 74 | 6f 20 66 69 6e 64 20 61 |failed t|o find a| |000033c0| 6e 0a 65 76 65 6e 74 2e | 0a 0a 20 20 20 20 20 4b |n.event.|.. K| |000033d0| 45 59 42 4f 41 52 44 2e | 20 20 20 54 68 65 72 65 |EYBOARD.| There| |000033e0| 20 20 61 72 65 20 20 6e | 6f 20 69 6e 70 75 74 20 | are n|o input | |000033f0| 70 61 72 61 6d 65 74 65 | 72 73 20 66 6f 72 20 74 |paramete|rs for t| |00003400| 68 65 20 20 6b 65 79 62 | 6f 61 72 64 0a 65 76 65 |he keyb|oard.eve| |00003410| 6e 74 2e 20 20 20 54 68 | 65 20 20 63 68 61 72 61 |nt. Th|e chara| |00003420| 63 74 65 72 20 20 77 68 | 69 63 68 20 20 69 73 20 |cter wh|ich is | |00003430| 72 65 61 64 20 69 73 20 | 72 65 74 75 72 6e 65 64 |read is |returned| |00003440| 20 20 61 73 20 20 61 20 | 20 31 36 2d 62 69 74 0a | as a | 16-bit.| |00003450| 71 75 61 6e 74 69 74 79 | 20 74 68 72 6f 75 67 68 |quantity| through| |00003460| 20 74 68 65 20 26 63 68 | 61 72 20 70 61 72 61 6d | the &ch|ar param| |00003470| 65 74 65 72 2e 20 20 46 | 6f 72 20 68 69 73 74 6f |eter. F|or histo| |00003480| 72 69 63 61 6c 20 72 65 | 61 73 6f 6e 73 2c 20 74 |rical re|asons, t| |00003490| 68 65 0a 63 6f 64 65 73 | 20 20 77 68 69 63 68 20 |he.codes| which | |000034a0| 20 61 72 65 20 72 65 74 | 75 72 6e 65 64 20 61 72 | are ret|urned ar| |000034b0| 65 20 63 6f 6d 70 61 74 | 69 62 6c 65 20 77 69 74 |e compat|ible wit| |000034c0| 68 20 74 68 65 20 49 42 | 4d 20 20 50 43 27 73 20 |h the IB|M PC's | |000034d0| 20 42 49 4f 53 0a 6c 65 | 76 65 6c 20 73 63 61 6e | BIOS.le|vel scan| |000034e0| 20 63 6f 64 65 73 2e 20 | 20 59 6f 75 20 63 61 6e | codes. | You can| |000034f0| 20 66 69 6e 64 20 74 68 | 69 73 20 63 68 61 72 61 | find th|is chara| |00003500| 63 74 65 72 20 74 61 62 | 6c 65 20 69 6e 20 41 70 |cter tab|le in Ap| |00003510| 70 65 6e 64 69 78 20 44 | 0a 6f 66 20 20 74 68 65 |pendix D|.of the| |00003520| 20 20 47 45 4d 20 56 44 | 49 20 6d 61 6e 75 61 6c | GEM VD|I manual| |00003530| 2e 20 20 20 49 6e 20 67 | 65 6e 65 72 61 6c 2c 20 |. In g|eneral, | |00003540| 20 74 68 65 20 68 69 67 | 68 20 62 79 74 65 20 6e | the hig|h byte n| |00003550| 65 65 64 20 6f 6e 6c 79 | 20 62 65 0a 63 6f 6e 73 |eed only| be.cons| |00003560| 69 64 65 72 65 64 20 20 | 69 66 20 20 74 68 65 20 |idered |if the | |00003570| 6c 6f 77 65 72 20 62 79 | 74 65 20 69 73 20 7a 65 |lower by|te is ze| |00003580| 72 6f 2e 20 20 20 49 66 | 20 74 68 65 20 6c 6f 77 |ro. If| the low| |00003590| 20 62 79 74 65 20 69 73 | 20 20 6e 6f 6e 2d 0a 7a | byte is| non-.z| |000035a0| 65 72 6f 2c 20 69 74 20 | 69 73 20 61 20 76 61 6c |ero, it |is a val| |000035b0| 69 64 20 41 53 43 49 49 | 20 63 68 61 72 61 63 74 |id ASCII| charact| |000035c0| 65 72 2e 0a 0a 20 20 20 | 20 20 45 76 6e 74 5f 6d |er... | Evnt_m| |000035d0| 75 6c 74 69 20 20 61 6c | 73 6f 20 72 65 74 75 72 |ulti al|so retur| |000035e0| 6e 73 20 74 68 65 20 73 | 74 61 74 75 73 20 6f 66 |ns the s|tatus of| |000035f0| 20 73 65 76 65 72 61 6c | 20 6d 6f 64 69 66 69 65 | several| modifie| |00003600| 72 20 20 6b 65 79 73 0a | 74 68 72 6f 75 67 68 20 |r keys.|through | |00003610| 20 74 68 65 20 26 6b 62 | 64 20 70 61 72 61 6d 65 | the &kb|d parame| |00003620| 74 65 72 2e 20 20 20 54 | 68 69 73 20 77 6f 72 64 |ter. T|his word| |00003630| 20 63 6f 6e 74 61 69 6e | 73 20 66 6f 75 72 20 73 | contain|s four s| |00003640| 69 67 6e 69 66 69 63 61 | 6e 74 0a 62 69 74 73 20 |ignifica|nt.bits | |00003650| 61 73 20 66 6f 6c 6c 6f | 77 73 3a 0a 0a 20 20 20 |as follo|ws:.. | |00003660| 20 20 30 78 30 30 30 31 | 20 2d 20 52 69 67 68 74 | 0x0001| - Right| |00003670| 20 68 61 6e 64 20 73 68 | 69 66 74 20 6b 65 79 0a | hand sh|ift key.| |00003680| 20 20 20 20 20 30 78 30 | 30 30 32 20 2d 20 4c 65 | 0x0|002 - Le| |00003690| 66 74 20 68 61 6e 64 20 | 73 68 69 66 74 20 6b 65 |ft hand |shift ke| |000036a0| 79 0a 20 20 20 20 20 30 | 78 30 30 30 34 20 2d 20 |y. 0|x0004 - | |000036b0| 43 6f 6e 74 72 6f 6c 20 | 6b 65 79 0a 20 20 20 20 |Control |key. | |000036c0| 20 30 78 30 30 30 38 20 | 2d 20 41 4c 54 20 6b 65 | 0x0008 |- ALT ke| |000036d0| 79 0a 0a 49 66 20 20 61 | 20 20 62 69 74 20 20 69 |y..If a| bit i| |000036e0| 73 20 20 6f 6e 65 2c 20 | 20 74 68 65 20 6b 65 79 |s one, | the key| |000036f0| 20 77 61 73 20 64 65 70 | 72 65 73 73 65 64 20 20 | was dep|ressed | |00003700| 77 68 65 6e 20 20 74 68 | 65 20 20 65 76 65 6e 74 |when th|e event| |00003710| 20 20 77 61 73 0a 67 65 | 6e 65 72 61 74 65 64 2e | was.ge|nerated.| |00003720| 20 20 20 4f 74 68 65 72 | 77 69 73 65 2c 20 20 74 | Other|wise, t| |00003730| 68 65 20 6b 65 79 20 77 | 61 73 20 75 70 2e 20 20 |he key w|as up. | |00003740| 53 69 6e 63 65 20 74 68 | 65 20 73 74 61 74 65 20 |Since th|e state | |00003750| 6f 66 20 74 68 65 73 65 | 0a 6b 65 79 73 20 20 69 |of these|.keys i| |00003760| 73 20 61 6c 72 65 61 64 | 79 20 74 61 6b 65 6e 20 |s alread|y taken | |00003770| 69 6e 74 6f 20 61 63 63 | 6f 75 6e 74 20 69 6e 20 |into acc|ount in | |00003780| 67 65 6e 65 72 61 74 69 | 6e 67 20 74 68 65 20 20 |generati|ng the | |00003790| 26 63 68 61 72 20 20 73 | 63 61 6e 0a 63 6f 64 65 |&char s|can.code| |000037a0| 2c 20 20 74 68 65 20 20 | 26 6b 62 64 20 77 6f 72 |, the |&kbd wor| |000037b0| 64 20 69 73 20 6d 6f 73 | 74 20 75 73 65 66 75 6c |d is mos|t useful| |000037c0| 20 77 68 65 6e 20 63 72 | 65 61 74 69 6e 67 20 65 | when cr|eating e| |000037d0| 6e 68 61 6e 63 65 64 20 | 20 6d 6f 75 73 65 0a 66 |nhanced | mouse.f| |000037e0| 75 6e 63 74 69 6f 6e 73 | 2c 20 73 75 63 68 20 61 |unctions|, such a| |000037f0| 73 20 73 68 69 66 74 2d | 63 6c 69 63 6b 20 6f 72 |s shift-|click or| |00003800| 20 63 6f 6e 74 72 6f 6c | 2d 64 72 61 67 2e 0a 0a | control|-drag...| |00003810| 20 20 20 20 20 52 41 4e | 44 4f 4d 20 4e 4f 54 45 | RAN|DOM NOTE| |00003820| 53 20 4f 4e 20 45 56 45 | 4e 54 53 2e 20 20 20 41 |S ON EVE|NTS. A| |00003830| 6c 74 68 6f 75 67 68 20 | 74 68 65 20 26 6d 78 2c |lthough |the &mx,| |00003840| 20 20 26 6d 79 2c 20 20 | 26 62 74 6e 2c 20 20 61 | &my, |&btn, a| |00003850| 6e 64 0a 26 6b 62 64 20 | 72 65 74 75 72 6e 73 20 |nd.&kbd |returns | |00003860| 61 72 65 20 6e 6f 6d 69 | 6e 61 6c 6c 79 20 61 73 |are nomi|nally as| |00003870| 73 6f 63 69 61 74 65 64 | 20 77 69 74 68 20 70 61 |sociated| with pa| |00003880| 72 74 69 63 75 6c 61 72 | 20 65 76 65 6e 74 20 74 |rticular| event t| |00003890| 79 70 65 73 2c 0a 74 68 | 65 79 20 61 72 65 20 76 |ypes,.th|ey are v| |000038a0| 61 6c 69 64 20 6f 6e 20 | 61 6e 79 20 72 65 74 75 |alid on |any retu| |000038b0| 72 6e 20 66 72 6f 6d 20 | 65 76 6e 74 5f 6d 75 6c |rn from |evnt_mul| |000038c0| 74 69 2c 20 61 6e 64 20 | 72 65 66 6c 65 63 74 20 |ti, and |reflect | |000038d0| 74 68 65 20 6c 61 73 74 | 0a 65 76 65 6e 74 20 20 |the last|.event | |000038e0| 77 68 69 63 68 20 77 61 | 73 20 6d 65 72 67 65 64 |which wa|s merged| |000038f0| 20 69 6e 74 6f 20 74 68 | 61 74 20 72 65 74 75 72 | into th|at retur| |00003900| 6e 20 62 79 20 74 68 65 | 20 41 45 53 2e 20 20 49 |n by the| AES. I| |00003910| 66 20 79 6f 75 20 20 77 | 61 6e 74 0a 6d 6f 72 65 |f you w|ant.more| |00003920| 20 20 63 75 72 72 65 6e | 74 20 76 61 6c 75 65 73 | curren|t values| |00003930| 2c 20 20 79 6f 75 20 6d | 61 79 20 75 73 65 20 67 |, you m|ay use g| |00003940| 72 61 66 5f 6d 6b 73 74 | 61 74 65 20 74 6f 20 72 |raf_mkst|ate to r| |00003950| 65 73 61 6d 70 6c 65 20 | 20 74 68 65 6d 2e 0a 57 |esample | them..W| |00003960| 68 69 63 68 65 76 65 72 | 20 6d 65 74 68 6f 64 20 |hichever| method | |00003970| 79 6f 75 20 63 68 6f 6f | 73 65 2c 20 62 65 20 63 |you choo|se, be c| |00003980| 6f 6e 73 69 73 74 65 6e | 74 20 77 69 74 68 69 6e |onsisten|t within| |00003990| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication| |000039a0| 2c 0a 73 69 6e 63 65 20 | 20 74 68 65 20 70 6f 69 |,.since | the poi| |000039b0| 6e 74 20 6f 66 20 73 61 | 6d 70 6c 69 6e 67 20 68 |nt of sa|mpling h| |000039c0| 61 73 20 61 6e 20 65 66 | 66 65 63 74 20 6f 6e 20 |as an ef|fect on | |000039d0| 6d 6f 75 73 65 20 20 61 | 6e 64 20 20 6b 65 79 62 |mouse a|nd keyb| |000039e0| 6f 61 72 64 0a 74 69 6d | 69 6e 67 2e 0a 0a 20 20 |oard.tim|ing... | |000039f0| 20 20 20 41 6c 74 68 6f | 75 67 68 20 20 74 68 69 | Altho|ugh thi| |00003a00| 73 20 61 6e 64 20 70 72 | 65 63 65 64 69 6e 67 20 |s and pr|eceding | |00003a10| 63 6f 6c 75 6d 6e 73 20 | 68 61 76 65 20 62 65 65 |columns |have bee| |00003a20| 6e 20 20 70 72 65 73 65 | 6e 74 65 64 20 20 69 6e |n prese|nted in| |00003a30| 0a 74 65 72 6d 73 20 6f | 66 20 61 20 47 45 4d 20 |.terms o|f a GEM | |00003a40| 61 70 70 6c 69 63 61 74 | 69 6f 6e 2c 20 20 74 68 |applicat|ion, th| |00003a50| 65 20 65 76 65 6e 74 20 | 73 79 73 74 65 6d 20 68 |e event |system h| |00003a60| 61 73 20 6d 61 6e 79 20 | 69 6e 74 65 72 65 73 74 |as many |interest| |00003a70| 69 6e 67 0a 69 6d 70 6c | 69 63 61 74 69 6f 6e 73 |ing.impl|ications| |00003a80| 20 20 66 6f 72 20 64 65 | 73 6b 20 61 63 63 65 73 | for de|sk acces| |00003a90| 73 6f 72 69 65 73 2e 20 | 20 20 53 69 6e 63 65 20 |sories. | Since | |00003aa0| 74 68 65 20 41 45 53 20 | 73 63 68 65 64 75 6c 65 |the AES |schedule| |00003ab0| 72 20 75 73 65 73 0a 6e | 6f 6e 2d 70 72 65 65 6d |r uses.n|on-preem| |00003ac0| 70 74 69 76 65 20 20 64 | 69 73 70 61 74 63 68 69 |ptive d|ispatchi| |00003ad0| 6e 67 2c 20 20 61 63 63 | 65 73 73 6f 72 69 65 73 |ng, acc|essories| |00003ae0| 20 20 68 61 76 65 20 61 | 6e 20 65 76 65 6e 74 20 | have a|n event | |00003af0| 20 70 72 69 6f 72 69 74 | 79 0a 65 66 66 65 63 74 | priorit|y.effect| |00003b00| 69 76 65 6c 79 20 20 65 | 71 75 61 6c 20 20 74 6f |ively e|qual to| |00003b10| 20 20 74 68 65 20 6d 61 | 69 6e 20 20 61 70 70 6c | the ma|in appl| |00003b20| 69 63 61 74 69 6f 6e 2e | 20 20 20 54 68 6f 75 67 |ication.| Thoug| |00003b30| 68 20 20 22 74 79 70 69 | 63 61 6c 22 0a 61 63 63 |h "typi|cal".acc| |00003b40| 65 73 73 6f 72 69 65 73 | 20 20 77 61 69 74 20 20 |essories| wait | |00003b50| 6f 6e 6c 79 20 66 6f 72 | 20 41 43 5f 4f 50 45 4e |only for| AC_OPEN| |00003b60| 20 6f 72 20 41 43 5f 43 | 4c 4f 53 45 20 6d 65 73 | or AC_C|LOSE mes| |00003b70| 73 61 67 65 73 20 20 77 | 68 65 6e 20 20 69 6e 0a |sages w|hen in.| |00003b80| 74 68 65 69 72 20 20 71 | 75 69 65 73 63 65 6e 74 |their q|uiescent| |00003b90| 20 73 74 61 74 65 2c 20 | 20 74 68 69 73 20 69 73 | state, | this is| |00003ba0| 20 6e 6f 74 20 61 20 72 | 65 71 75 69 72 65 6d 65 | not a r|equireme| |00003bb0| 6e 74 20 6f 66 20 74 68 | 65 20 20 73 79 73 74 65 |nt of th|e syste| |00003bc0| 6d 2e 0a 54 69 6d 65 72 | 20 20 61 6e 64 20 20 6f |m..Timer| and o| |00003bd0| 74 68 65 72 20 65 76 65 | 6e 74 73 20 6d 61 79 20 |ther eve|nts may | |00003be0| 61 6c 73 6f 20 62 65 20 | 72 65 71 75 65 73 74 65 |also be |requeste| |00003bf0| 64 20 20 62 79 20 20 61 | 6e 20 20 61 63 63 65 73 |d by a|n acces| |00003c00| 73 6f 72 79 2e 0a 28 49 | 6e 64 65 65 64 2c 20 20 |sory..(I|ndeed, | |00003c10| 74 68 65 72 65 20 20 69 | 73 20 20 6e 6f 20 20 61 |there i|s no a| |00003c20| 62 73 6f 6c 75 74 65 20 | 72 65 71 75 69 72 65 6d |bsolute |requirem| |00003c30| 65 6e 74 20 20 74 68 61 | 74 20 20 61 6e 20 20 61 |ent tha|t an a| |00003c40| 63 63 65 73 73 6f 72 79 | 0a 61 64 76 65 72 74 69 |ccessory|.adverti| |00003c50| 73 65 20 20 69 74 73 20 | 70 72 65 73 65 6e 63 65 |se its |presence| |00003c60| 20 77 69 74 68 20 61 20 | 6d 65 6e 75 5f 72 65 67 | with a |menu_reg| |00003c70| 69 73 74 65 72 20 63 61 | 6c 6c 2e 29 20 20 54 68 |ister ca|ll.) Th| |00003c80| 65 20 20 61 73 70 69 72 | 69 6e 67 0a 47 45 4d 20 |e aspir|ing.GEM | |00003c90| 68 61 63 6b 65 72 20 6d | 69 67 68 74 20 63 6f 6e |hacker m|ight con| |00003ca0| 73 69 64 65 72 20 68 6f | 77 20 74 68 65 73 65 20 |sider ho|w these | |00003cb0| 66 61 63 74 73 20 63 6f | 75 6c 64 20 62 65 20 75 |facts co|uld be u| |00003cc0| 73 65 64 20 74 6f 20 20 | 63 72 65 61 74 65 0a 61 |sed to |create.a| |00003cd0| 63 63 65 73 73 6f 72 69 | 65 73 20 20 73 69 6d 69 |ccessori|es simi| |00003ce0| 6c 61 72 20 20 74 6f 20 | 20 22 42 55 47 53 22 20 |lar to | "BUGS" | |00003cf0| 6f 6e 20 74 68 65 20 4d | 61 63 2c 20 20 6f 72 20 |on the M|ac, or | |00003d00| 20 74 6f 20 20 74 68 65 | 20 20 22 43 72 61 62 73 | to the| "Crabs| |00003d10| 22 0a 70 72 6f 67 72 61 | 6d 20 20 64 65 73 63 72 |".progra|m descr| |00003d20| 69 62 65 64 20 20 69 6e | 20 20 74 68 65 20 53 65 |ibed in| the Se| |00003d30| 70 74 65 6d 62 65 72 2c | 20 20 31 39 38 35 20 69 |ptember,| 1985 i| |00003d40| 73 73 75 65 20 20 6f 66 | 20 20 53 63 69 65 6e 74 |ssue of| Scient| |00003d50| 69 66 69 63 0a 41 6d 65 | 72 69 63 61 6e 2e 0a 0a |ific.Ame|rican...| |00003d60| 20 20 20 20 20 45 56 45 | 4e 54 53 20 20 41 4e 44 | EVE|NTS AND| |00003d70| 20 47 45 4d 20 50 52 4f | 47 52 41 4d 20 53 54 52 | GEM PRO|GRAM STR| |00003d80| 55 43 54 55 52 45 2e 20 | 20 20 41 6c 74 68 6f 75 |UCTURE. | Althou| |00003d90| 67 68 20 74 68 65 20 20 | 65 76 6e 74 5f 6d 75 6c |gh the |evnt_mul| |00003da0| 74 69 0a 63 61 6c 6c 20 | 20 6d 69 67 68 74 20 73 |ti.call | might s| |00003db0| 65 65 6d 20 74 6f 20 62 | 65 20 61 20 73 6d 61 6c |eem to b|e a smal| |00003dc0| 6c 20 70 61 72 74 20 6f | 66 20 74 68 65 20 65 6e |l part o|f the en| |00003dd0| 74 69 72 65 20 47 45 4d | 20 73 79 73 74 65 6d 2c |tire GEM| system,| |00003de0| 20 20 69 74 73 0a 75 73 | 61 67 65 20 68 61 73 20 | its.us|age has | |00003df0| 64 65 65 70 20 69 6d 70 | 6c 69 63 61 74 69 6f 6e |deep imp|lication| |00003e00| 73 20 66 6f 72 20 74 68 | 65 20 73 74 72 75 63 74 |s for th|e struct| |00003e10| 75 72 65 20 6f 66 20 61 | 6e 79 20 20 61 70 70 6c |ure of a|ny appl| |00003e20| 69 63 61 74 69 6f 6e 2e | 0a 49 74 20 69 73 20 67 |ication.|.It is g| |00003e30| 65 6e 65 72 61 6c 6c 79 | 20 74 72 75 65 20 74 68 |enerally| true th| |00003e40| 61 74 20 65 61 63 68 20 | 75 73 65 20 6f 66 20 65 |at each |use of e| |00003e50| 76 6e 74 5f 6d 75 6c 74 | 69 20 63 6f 72 72 65 73 |vnt_mult|i corres| |00003e60| 70 6f 6e 64 73 20 74 6f | 20 20 61 0a 6d 6f 64 65 |ponds to| a.mode| |00003e70| 20 20 69 6e 20 20 74 68 | 65 20 20 70 72 6f 67 72 | in th|e progr| |00003e80| 61 6d 2e 20 20 20 46 6f | 72 20 69 6e 73 74 61 6e |am. Fo|r instan| |00003e90| 63 65 2c 20 20 66 6f 72 | 6d 5f 64 6f 20 63 6f 6e |ce, for|m_do con| |00003ea0| 74 61 69 6e 73 20 69 74 | 73 20 20 6f 77 6e 0a 65 |tains it|s own.e| |00003eb0| 76 6e 74 5f 6d 75 6c 74 | 69 2c 20 20 61 6e 64 20 |vnt_mult|i, and | |00003ec0| 69 74 73 20 69 6e 76 6f | 63 61 74 69 6f 6e 20 63 |its invo|cation c| |00003ed0| 72 65 61 74 65 73 20 61 | 20 6d 6f 64 65 64 20 64 |reates a| moded d| |00003ee0| 69 61 6c 6f 67 2e 20 20 | 57 68 69 6c 65 20 74 68 |ialog. |While th| |00003ef0| 65 0a 64 69 61 6c 6f 67 | 20 20 69 73 20 69 6e 20 |e.dialog| is in | |00003f00| 70 72 6f 67 72 65 73 73 | 2c 20 20 6f 74 68 65 72 |progress|, other| |00003f10| 20 66 65 61 74 75 72 65 | 73 20 73 75 63 68 20 61 | feature|s such a| |00003f20| 73 20 77 69 6e 64 6f 77 | 73 20 61 6e 64 20 20 6d |s window|s and m| |00003f30| 65 6e 75 73 0a 61 72 65 | 20 75 6e 75 73 61 62 6c |enus.are| unusabl| |00003f40| 65 2e 20 20 54 68 65 20 | 67 72 61 66 5f 64 72 61 |e. The |graf_dra| |00003f50| 67 62 6f 78 2c 20 67 72 | 61 66 5f 72 75 62 62 65 |gbox, gr|af_rubbe| |00003f60| 72 62 6f 78 2c 20 61 6e | 64 20 67 72 61 66 5f 73 |rbox, an|d graf_s| |00003f70| 6c 69 64 65 62 6f 78 0a | 72 6f 75 74 69 6e 65 73 |lidebox.|routines| |00003f80| 20 61 6c 73 6f 20 63 6f | 6e 74 61 69 6e 20 65 76 | also co|ntain ev| |00003f90| 6e 74 5f 6d 75 6c 74 69 | 20 63 61 6c 6c 73 2e 20 |nt_multi| calls. | |00003fa0| 20 20 54 68 65 79 20 63 | 72 65 61 74 65 20 61 20 | They c|reate a | |00003fb0| 6d 6f 64 65 20 77 68 69 | 63 68 0a 69 73 20 73 6f |mode whi|ch.is so| |00003fc0| 6d 65 74 69 6d 65 73 20 | 63 61 6c 6c 65 64 20 22 |metimes |called "| |00003fd0| 73 70 72 69 6e 67 2d 6c | 6f 61 64 65 64 22 2c 20 |spring-l|oaded", | |00003fe0| 20 73 69 6e 63 65 20 74 | 68 65 20 6d 6f 64 65 20 | since t|he mode | |00003ff0| 76 61 6e 69 73 68 65 73 | 20 77 68 65 6e 0a 73 6f |vanishes| when.so| |00004000| 6d 65 20 63 6f 6e 74 69 | 6e 75 69 6e 67 20 63 6f |me conti|nuing co| |00004010| 6e 64 69 74 69 6f 6e 20 | 28 61 20 64 65 70 72 65 |ndition |(a depre| |00004020| 73 73 65 64 20 6d 6f 75 | 73 65 20 62 75 74 74 6f |ssed mou|se butto| |00004030| 6e 29 20 69 73 20 72 65 | 6d 6f 76 65 64 2e 0a 0a |n) is re|moved...| |00004040| 20 20 20 20 20 49 6e 20 | 63 6f 6e 73 65 71 75 65 | In |conseque| |00004050| 6e 63 65 2c 20 20 61 20 | 77 65 6c 6c 2d 64 65 73 |nce, a |well-des| |00004060| 69 67 6e 65 64 2c 20 20 | 6e 6f 6e 2d 6d 6f 64 61 |igned, |non-moda| |00004070| 6c 20 47 45 4d 20 70 72 | 6f 67 72 61 6d 20 77 69 |l GEM pr|ogram wi| |00004080| 6c 6c 0a 63 6f 6e 74 61 | 69 6e 20 6f 6e 6c 79 20 |ll.conta|in only | |00004090| 6f 6e 65 20 65 78 70 6c | 69 63 69 74 20 65 76 6e |one expl|icit evn| |000040a0| 74 5f 6d 75 6c 74 69 20 | 63 61 6c 6c 2e 20 20 54 |t_multi |call. T| |000040b0| 68 69 73 20 63 61 6c 6c | 20 69 73 20 70 61 72 74 |his call| is part| |000040c0| 20 6f 66 20 61 0a 74 6f | 70 2d 6c 65 76 65 6c 20 | of a.to|p-level | |000040d0| 20 6c 6f 6f 70 20 20 77 | 68 69 63 68 20 20 64 65 | loop w|hich de| |000040e0| 63 6f 64 65 73 20 65 76 | 65 6e 74 73 20 61 73 20 |codes ev|ents as | |000040f0| 74 68 65 79 20 20 61 72 | 65 20 20 72 65 63 65 69 |they ar|e recei| |00004100| 76 65 64 20 20 61 6e 64 | 0a 64 69 73 70 61 74 63 |ved and|.dispatc| |00004110| 68 65 73 20 20 63 6f 6e | 74 72 6f 6c 20 20 74 6f |hes con|trol to| |00004120| 20 20 74 68 65 20 61 70 | 70 72 6f 70 72 69 61 74 | the ap|propriat| |00004130| 65 20 20 68 61 6e 64 6c | 69 6e 67 20 20 72 6f 75 |e handl|ing rou| |00004140| 74 69 6e 65 2e 20 20 20 | 54 68 65 0a 64 69 73 70 |tine. |The.disp| |00004150| 61 74 63 68 65 72 20 20 | 6d 75 73 74 20 20 61 6c |atcher |must al| |00004160| 77 61 79 73 20 20 64 69 | 73 74 69 6e 67 75 69 73 |ways di|stinguis| |00004170| 68 20 20 62 65 74 77 65 | 65 6e 20 20 65 76 65 6e |h betwe|en even| |00004180| 74 20 20 74 79 70 65 73 | 2e 20 20 20 49 6e 0a 70 |t types|. In.p| |00004190| 72 6f 67 72 61 6d 73 20 | 20 77 68 65 72 65 20 20 |rograms | where | |000041a0| 6d 75 6c 74 69 70 6c 65 | 20 77 69 6e 64 6f 77 73 |multiple| windows| |000041b0| 20 61 72 65 20 75 73 65 | 64 2c 20 20 69 74 20 6d | are use|d, it m| |000041c0| 61 79 20 61 6c 73 6f 20 | 20 6e 65 65 64 20 20 74 |ay also | need t| |000041d0| 6f 0a 64 65 74 65 72 6d | 69 6e 65 20 77 68 69 63 |o.determ|ine whic| |000041e0| 68 20 6c 6f 63 61 6c 20 | 64 61 74 61 20 73 74 72 |h local |data str| |000041f0| 75 63 74 75 72 65 20 69 | 73 20 61 73 73 6f 63 69 |ucture i|s associ| |00004200| 61 74 65 64 20 77 69 74 | 68 20 74 68 65 20 61 63 |ated wit|h the ac| |00004210| 74 69 76 65 0a 77 69 6e | 64 6f 77 2e 0a 0a 20 20 |tive.win|dow... | |00004220| 20 20 20 54 68 69 73 20 | 20 63 6f 6e 73 74 72 75 | This | constru| |00004230| 63 74 69 6f 6e 20 20 69 | 73 20 20 73 6f 6d 65 74 |ction i|s somet| |00004240| 69 6d 65 73 20 20 63 61 | 6c 6c 65 64 20 20 61 20 |imes ca|lled a | |00004250| 20 22 70 75 73 68 22 20 | 20 70 72 6f 67 72 61 6d | "push" | program| |00004260| 0a 73 74 72 75 63 74 75 | 72 65 2c 20 20 62 65 63 |.structu|re, bec| |00004270| 61 75 73 65 20 20 69 74 | 20 20 61 6c 6c 6f 77 73 |ause it| allows| |00004280| 20 74 68 65 20 75 73 65 | 72 20 74 6f 20 64 72 69 | the use|r to dri| |00004290| 76 65 20 74 68 65 20 20 | 61 70 70 6c 69 63 61 74 |ve the |applicat| |000042a0| 69 6f 6e 0a 62 79 20 67 | 65 6e 65 72 61 74 69 6e |ion.by g|eneratin| |000042b0| 67 20 65 76 65 6e 74 73 | 20 69 6e 20 61 6e 79 20 |g events| in any | |000042c0| 6f 72 64 65 72 2e 20 20 | 54 68 69 73 20 63 6f 6e |order. |This con| |000042d0| 74 72 61 73 74 73 20 77 | 69 74 68 20 74 68 65 20 |trasts w|ith the | |000042e0| 22 70 75 6c 6c 22 0a 73 | 74 72 75 63 74 75 72 65 |"pull".s|tructure| |000042f0| 20 6f 66 20 74 72 61 64 | 69 74 69 6f 6e 61 6c 20 | of trad|itional | |00004300| 63 6f 6d 6d 61 6e 64 20 | 6c 69 6e 65 20 6f 72 20 |command |line or | |00004310| 6d 65 6e 75 20 70 72 6f | 67 72 61 6d 73 2c 20 20 |menu pro|grams, | |00004320| 77 68 65 72 65 20 74 68 | 65 0a 61 70 70 6c 69 63 |where th|e.applic| |00004330| 61 74 69 6f 6e 20 69 73 | 20 69 6e 20 63 6f 6e 74 |ation is| in cont| |00004340| 72 6f 6c 20 61 6e 64 20 | 64 65 6d 61 6e 64 73 20 |rol and |demands | |00004350| 69 6e 70 75 74 20 61 74 | 20 65 61 63 68 20 73 74 |input at| each st| |00004360| 65 70 20 62 65 66 6f 72 | 65 20 69 74 0a 70 72 6f |ep befor|e it.pro| |00004370| 63 65 65 64 73 2e 20 20 | 20 20 22 50 75 73 68 22 |ceeds. | "Push"| |00004380| 20 20 73 74 72 75 63 74 | 75 72 65 20 20 70 72 6f | struct|ure pro| |00004390| 6d 6f 74 65 73 20 20 63 | 6f 6e 73 69 73 74 65 6e |motes c|onsisten| |000043a0| 74 20 20 75 73 65 20 20 | 6f 66 20 20 74 68 65 0a |t use |of the.| |000043b0| 75 73 65 72 20 69 6e 74 | 65 72 66 61 63 65 20 61 |user int|erface a| |000043c0| 6e 64 20 61 20 66 65 65 | 6c 69 6e 67 20 6f 66 20 |nd a fee|ling of | |000043d0| 63 6f 6e 74 72 6f 6c 20 | 6f 6e 20 74 68 65 20 70 |control |on the p| |000043e0| 61 72 74 20 6f 66 20 74 | 68 65 20 75 73 65 72 2e |art of t|he user.| |000043f0| 0a 0a 20 20 20 20 20 54 | 68 65 20 20 6e 65 78 74 |.. T|he next| |00004400| 20 53 54 20 50 52 4f 20 | 47 45 4d 20 63 6f 6c 75 | ST PRO |GEM colu| |00004410| 6d 6e 20 77 69 6c 6c 20 | 6c 6f 6f 6b 20 6d 6f 72 |mn will |look mor| |00004420| 65 20 63 6c 6f 73 65 6c | 79 20 61 74 20 20 65 76 |e closel|y at ev| |00004430| 65 6e 74 73 0a 61 6e 64 | 20 20 70 72 6f 67 72 61 |ents.and| progra| |00004440| 6d 20 20 73 74 72 75 63 | 74 75 72 65 20 69 6e 20 |m struc|ture in | |00004450| 74 68 65 20 63 6f 6e 74 | 65 78 74 20 6f 66 20 61 |the cont|ext of a| |00004460| 20 6c 61 72 67 65 20 70 | 69 65 63 65 20 20 6f 66 | large p|iece of| |00004470| 20 20 63 6f 64 65 2e 0a | 54 68 65 20 20 63 6f 64 | code..|The cod| |00004480| 65 20 20 69 6d 70 6c 65 | 6d 65 6e 74 73 20 61 6e |e imple|ments an| |00004490| 20 61 6c 74 65 72 6e 61 | 74 65 20 64 69 61 6c 6f | alterna|te dialo| |000044a0| 67 20 20 68 61 6e 64 6c | 65 72 2c 20 20 69 6e 63 |g handl|er, inc| |000044b0| 6f 72 70 6f 72 61 74 69 | 6e 67 0a 6d 6f 75 73 65 |orporati|ng.mouse| |000044c0| 2d 73 65 6e 73 69 74 69 | 76 65 20 6f 62 6a 65 63 |-sensiti|ve objec| |000044d0| 74 73 20 61 73 20 70 61 | 72 74 20 6f 66 20 74 68 |ts as pa|rt of th| |000044e0| 65 20 73 74 61 6e 64 61 | 72 64 20 69 6e 74 65 72 |e standa|rd inter| |000044f0| 66 61 63 65 2e 20 20 20 | 53 69 6e 63 65 0a 74 68 |face. |Since.th| |00004500| 69 73 20 20 63 6f 64 65 | 20 20 69 73 20 20 22 6f |is code| is "o| |00004510| 70 65 6e 22 2c 20 20 69 | 74 20 6d 61 79 20 62 65 |pen", i|t may be| |00004520| 20 6d 6f 64 69 66 69 65 | 64 20 61 6e 64 20 20 6d | modifie|d and m| |00004530| 65 72 67 65 64 20 20 77 | 69 74 68 20 20 61 6e 79 |erged w|ith any| |00004540| 0a 61 70 70 6c 69 63 61 | 74 69 6f 6e 27 73 20 6d |.applica|tion's m| |00004550| 61 69 6e 20 65 76 65 6e | 74 20 6c 6f 6f 70 2c 20 |ain even|t loop, | |00004560| 72 65 73 75 6c 74 69 6e | 67 20 69 6e 20 6e 6f 6e |resultin|g in non| |00004570| 2d 6d 6f 64 61 6c 20 64 | 69 61 6c 6f 67 73 2e 0a |-modal d|ialogs..| |00004580| 0a 0a | |.. | | +--------+-------------------------+-------------------------+--------+--------+